Check documentation for the latest version of dhtmlxSuite onSubGridCreated DHTMLX Docs

onSubGridCreated

fires when the creation of a sub-grid was initialized (can be blocked)

void onSubGridCreated(object sub_grid_obj,string|number rId,number rInd);
sub_grid_objobjectsub-grid object
rIdstring|numberthe id of the related row
rIndnumberthe index of the related row

Example

//The event can be used to change the grid behavior: 
mygrid.attachEvent("onSubGridCreated",function(subgrid){
    subgrid.enableMultiselect(true);
    subgrid.enableEditEvents(false,false,false);
    return true; // mandatory!
});
//The event can be used to completely change the way the sub-grid is loaded
grid.attachEvent("onSubGridCreated",function(subgrid){
    subgrid.setHeader("A,B,C");
    subgrid.setColTypes("ro,ro,ro");
    subgrid.setInitWidths("100,100,100");
    subgrid.init();
    subgrid.load("data.xml");
    return false;  // block default behavior
});

Back to top