DHTMLX Docs & Samples Explorer

Index
dhtmlxconnector
XML format used by connector

# XML format used by connector

## Grid

       <rows>
               <row id="some1"><cell>value 1,1</cell><cell>value 1,2</cell></row>
               <row id="some2"><cell>value 2,1</cell><cell>value 2,2</cell></row>
       </rows>

- row - tag represents row in the grid
- cell - tag represents cell in the grid

row@id - mandatory attribute, must be unique for each row; row and cell tags may contain additional attributes, which will be processed in default way

In dyn loading mode

       <rows total_count="50000" pos="1230">
               <row id="some1230"><cell>value 1,1</cell><cell>value 1,2</cell></row>
               <row id="some1231"><cell>value 2,1</cell><cell>value 2,2</cell></row>
       </rows>

- rows@total_count - count of rows in grid, need to be sent only for first data request ( when posStart parameter is not defined )
- rows@pos - equal to posStart parameters, define in which place of grid data will added

## TreeGrid

       <rows>
               <row id="some1">
                  <cell image="some.gif">value 1,1</cell><cell>value 1,2</cell>
                  <row id="some11"><cell>child value 1</cell><cell>child value 2</cell></row>
               </row>
               <row id="some2"><cell>value 2,1</cell><cell>value 2,2</cell></row>
       </rows>

- row - tag represents row in the grid, one row tag can contain other row tags inside ( parent - child relation in hierarchy )
- cell - tag represents cell in the grid
- row@id - mandatory attribute, must be unique for each row
- cell@image - can define image for tree cell in grid ( optional )

Dyn. loading

       <rows parent="id">
               <row id="some1" xmlkids="1">
                  <cell image="some.gif">value 1,1</cell><cell>value 1,2</cell>
               </row>
               <row id="some2"><cell>value 2,1</cell><cell>value 2,2</cell></row>
       </rows>

- row@xmlkids - defines that row can contain child nodes
- rows@parent - name of parent ID ( equal to incoming “id” parameter ) , ID of virtual root - 0

## Tree

       <tree>
            <item id="some" text="name">
                     <item id="child1" text="name 1"/>
                     <item id="child2" text="name 2"/>
            </item>
       </tree>

- item tag - item in a tree, can nest other item tags to represent parent-child relation
- item@id - ID, unique for each item
- item@text - label

In case of dyn. loading

       <tree id="id">
            <item id="some" text="name" childs="1">
            </item>
       </tree>

- item@childs - defines that row can contain child nodes
- tree@id - name of parent ID ( equal to incoming “id” parameter ) , ID of virtual root - 0

## Combo

        <data>
            <option value="some">Some label</option>
            <option value="other">Other label</option>
        </data>

- option - represent option in combo

In case of dyn. loading

        <data add="true">
            <option value="some">Some label</option>
            <option value="other">Other label</option>
        </data>

If “pos” parameter was provided, response must contain data@add attribute , to mark that it not new set of values, but addition to existing one.