i have a GridView which has a Gridview as HierarchyChildTemplate. How can I get a reference to the SelectedItems of the child GridView?
Thanks
3 Answers, 1 is accepted
0
Dimitrina
Telerik team
answered on 02 Aug 2012, 11:53 AM
Hi,
You could bind the SelectedItems property of the details GridView to a corresponding collection in your data object (shown as a parent item). May I ask you when you will need to access the SelectedItems? Do you want to change them, or do you want just to read them?
I solved the problem by subscribing to the SelectionChanged event of the child grid and in the event hanndler I store the SelectedItems in an instance variable in the code behind file. So when I need the SelectedItems, I get them from that instance variable.
I need the SelectedItems to perform some operations on the bound data objects. In that special case to call a delete routine.
Regards,
Eugen
0
Dimitrina
Telerik team
answered on 02 Aug 2012, 04:49 PM
Hello Eugen,
Thank you for sharing your solution to the community.