I have a 2-level grid showing log entries and details for each log entry. I am able to populate the log entries, i.e., first level, using client-side script.
var grid = igtbl_getGridById("my_grid");
row.getCell(0).setValue('value 0');
row.getCell(1).setValue('value 1');
...
}
Thank you,
Girish
Hello Girish,
Thanks for writing. I believe you can take advantage of the client-side Bands collection of the grid to get to the second band (child band) and then use the client-side methods of the Band iteself
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebGrid_Object_CSOM.html
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebGrid_Band_Object_CSOM.html
In any case, I believe in your scenario you are looking for AJAX (the child band comes on demand via Ajax Calls), so this might be the easier approach here (as opposed to using client-side javascript code).
You can check out the "AJAX" examples in our samples browser located here:
http://samples.infragistics.com/2008.2/webfeaturebrowser/default.htm
Thank you Rumen.
While I was waiting for a reply, I experimented with bands and figured out how to dynamically add data to the nested grid.
grid.Bands[1].addNew(); // is for the nested grid
I am populating the nested grid using client-side event...
<ClientSideEvents BeforeRowExpandedHandler="my_function" />
The only pending issue I haven't sorted out has to do with the "+" sign for parent rows. Unless I add a dummy child row, the "+" doesn't appear. So, currently I am adding a dummy row, and then removing it when the real data is populated.
I looked at the example, that populates the child band on demand. Unfortunately, I can't use it. I have to use a webservice to fetch the nested grid data separately.