This is a migrated thread and some comments may be shown as answers.

Client API to get child table items

3 Answers 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
miksh
Top achievements
Rank 1
Iron
miksh asked on 24 Sep 2008, 11:42 AM
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.

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 26 Sep 2008, 01:02 PM
Hi,

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.
0
miksh
Top achievements
Rank 1
Iron
answered on 26 Sep 2008, 04:23 PM
That would be great, thanks!
Tags
Grid
Asked by
miksh
Top achievements
Rank 1
Iron
Answers by
Princy
Top achievements
Rank 2
Rosen
Telerik team
miksh
Top achievements
Rank 1
Iron
Share this question
or