Problem using master_checkbox in grid with connector

Using dhtmlxSuite v2.5 pro 91111 edition.

I have a dhtmlxGrid object, which is used in conjunction with GridConnector to populate the grid.

Here is the code snippet:
myconnector.php

$gridConn = new GridConnector($res,"Oracle"); $gridConn->set_encoding("iso-8859-1"); $gridConn->render_table("TABLE_NAME","COL1","COL1,COL2,COL3,COL4");

mygrid.php

[code] mygrid.setHeader(“Selection,COL1,COL2,COL3,COL4”);
mygrid.attachHeader("#master_checkbox,#text_filter,#text_filter,#text_filter,#text_filter");
mygrid.setInitWidths(“80,80,*,80,240”);
mygrid.setColAlign(“left,left,left,left,left”);
mygrid.setColTypes(“ch,ro,ro,ro,ro”);
mygrid.setColSorting(“na,int,server,server,server”);
// Using enableSmartRendering, upon scrolling, large amount of data/rows, appear to be missing
// and not using this api, leads to slow page/data rendering
mygrid.enableSmartRendering(true);

mygrid.init();
// to avoid reloading of the same data
mygrid.loadXML("./myconnector.php?un=" + Date.parse(new Date()));[/code]

Problems/Issues:
The first column in my grid is different than what is defined in the gridConnector. Only in the grid, I will like to add a checkbox as a first column a
nd populate the remaining columns from the connector. Is this possible?

Note: when I use the checkbox as a last column, the checkbox icon doesn’t appear in each row, only in the header, have you seen this issue before?

  1. The data

I will like to add a checkbox as a first column and populate the remaining columns from the connector. Is this possible?

Unfortunately this is not available. The dhtmlxGrid is a row-orientated product.
You may try to load the data from connector and then change the data in the first column after that.

How about inserting a column after grid initialization?

I included dhtmlxgrid_mcol.js
and attempted to move columns as follows:

mygrid.init(); mygrid.loadXML("xyz.php?un=" + Date.parse(new Date())); var index = 0 ; mygrid.moveColumn(index++,index++); mygrid.insertColumn(0,"Selection","ch");

However, this results in following error:

Uncaught TypeError: Cannot read property 'style' of undefined