It's not a problem to get parent data by get_parentView() and get_parentRow(). How to get child tableview or items on client-side if a parent row is selected?
In particular, I need to select all child items when the parent row was selected.
You can try out the following code on the RowSeleced client event of the grid to select the child items when the parent item is expanded and selected .
js:
function RowSelected(sender, eventArgs)
{
var Grid1 = $find("<%= RadGrid1.ClientID %>");
var rows = Grid1.get_detailTables()[0].get_dataItems();
for (var i = 0; i <rows.length; i++)
{
var row = rows[i];
row.set_selected(true);
}
}
Thanks
Princy.
0
Rosen
Telerik team
answered on 26 Sep 2008, 04:20 PM
Hi miksh,
I'm afraid that currently such functionality is not available out of the box. However we will consider implementing it for the next release of RadGrid control.
Please excuse us for any inconvenience that this may caused you.
Sincerely yours,
Rosen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.