how to group from a specific column, table autoloaded

Hi,

I have an existing table which I am generating via PHP.

I put the table code as:

and the grid is starting to work.

My question is, using this type of method, how do I set the grid/table to group . my table is something like col1, col2 … col11, col12

I want to group by col1, and optionally if possible, use sum, avg , min , max etc on col11,col12
so that if it is all in collapsed state, it shows the group name and the sum, etc functions as desired.

Thanks,
Shashi

Unfortunately you will have to call groupBy method after the calling an dhtmlxGrid:

mygrid = new dhtmlXGridFromTable(‘tblToGrid’);
mygrid.groupBy(0);

Here is the example of the init:

[code]

















Column 1 Column 2
11 value1
11 value2
11 value3

mygrid = new dhtmlXGridFromTable('tblToGrid'); mygrid.groupBy(1,["#stat_max","#title"]);

function doBeforeInit(){
grid1.getCombo(0).put(“11”,“aaaaa”);
};

function doAfterInit(){
};[/code]