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

How to change SelectedaItems for child table and parent table at the same time?

1 Answer 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Hao
Top achievements
Rank 1
Hao asked on 14 Sep 2011, 06:41 AM
Hi Telerik,

What I want to achieve is as following:
1. When I select the items from my child table, the focus will move to the parent row for current selected items.
2. When I select another row in parent table other than current selected items of child table referring to, the selected items of child table will be cleared.

I am not sure if above is clear enough. Basically, what I want to do is to select child table rows and it can automatically focus on the correct parent row. Also, if I want to select another parent row, it will clean the previous selected child rows.


Thanks!

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 17 Sep 2011, 12:48 PM
Hello Hao,

I believe the set of the SelectedItems property and the SelectionChanged event of RadGridView would help in this situation .
What you need to do is to subscribe to the SelectionChanged event of the child grid. Then inside the handler to set the selected items in the parent grid via the SelectedItems property.

The specific implementation would highly depend on the way you have set your hierarchy.

In case you find troubles implementing the above-mentioned approach , please paste me the code/XAMl relevant to your hierarchy , so  I can assist further .

Kind regards,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Hao
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or