The stated functionality requires the PRO version of dhtmlxGrid.
The 'split' mode allows you to have a grid separated into 2 parts:
To 'froze' columns, use the splitAt method.
Note, the method must be called after the grid has been initialized but before data is loaded to it.
Enabling the 'split' mode
mygrid.init();
mygrid.splitAt(2);//'freezes' 2 first columns mygrid.load("grid.xml");
Related sample: Grid in split mode
If you specify the grid's configuration in XML, use the following technique to activate the 'split' mode:
Using the 'split' mode in the XML configuration
<rows>
<head>
<column width="50" type="dyn" align="right" sort="int">Sales</column>
<column width="150" type="ed" align="left" sort="str">Book Title</column>
<column width="120" type="ed" align="left" sort="str">Author</column>
<column width="80" type="price" align="left" sort="str">Price</column>
<afterInit>
<call command="splitAt"><param>2</param></call> </afterInit>
</head>
<row>
<cell>-1500</cell>
<cell><![CDATA[A Time to Kill]]></cell>
<cell><![CDATA[John Grisham]]></cell>
<cell>12.99</cell>
</row>
</rows>
If you specify the grid's configuration in HTML, use the following technique to activate the 'split' mode:
Using the 'split' mode in the HTML configuration
<table class="dhtmlxGrid" split="2"> <tr>
<td width="150" type="dyn" align="right" sort="str">Sales</td>
<td width="150" type="ed" align="left" sort="str">Book Title</td>
<td width="120" type="ed" align="left" sort="str">Author</td>
<td width="80" type="price" align="left" sort="str">Price</td>
</tr>
<tr>
<td>-1500</td>
<td><![CDATA[A Time to Kill]]></td>
<td><![CDATA[John Grisham]]></td>
<td>12.99</td>
</tr>
</table>
Back to top