How is selected row retrieved for a sub grid. How is grid object defined when loaded from sub.xml?
How is grid object defined when loaded from sub.xml?
The grid object fully based on configuration XML assigned to cell in question.
To get subgrid object you can use
grid.cells(i,j).getSubGrid(); // where i,j - coordinates of sub_grid cell
Subgrid is fully functional instance of dhtmlxgrid, so any existing API can be used against it
grid.cells(i,j).getSubGrid().getSelectedRowId()
Your answer is fine but the problem appears to lie in ensuring that the ‘parent cell’ row is automatically selected when the expand event completes. A sample would be helpful or a pointer to the API method to achieve selection of the parent row.
Thanks
With updated version of sub_row excell next code is possible
grid.attachEvent(“onSubGridLoaded”,function(subgrid,id,index){
this.setSelectedRow(id);
});
Latest subgrid code can be grabbed from here
dhtmlx.com/docs/products/kb/inde … rch&q=2340
Help!
Getting error at this URL to download updated subgrid code (unexpected error try later) Several later tries unsuccessful
dhtmlx.com/docs/products/kb/inde … rch&q=2340