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

SelectedChildItem

1 Answer 37 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Josef
Top achievements
Rank 1
Josef asked on 25 Jan 2012, 07:02 AM
Hello,
how can I get the SelectedItem of a HierachyChildTemplate using MVVM and Binding?
Regards
Josef

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 25 Jan 2012, 07:38 AM
Hello Josef,

You can expose a property in your ViewModel and bind the SelectedItem of the child grid as follows:

<telerik:RadGridView ItemsSource="{Binding ChildCollection}" SelectedItem="{Binding MyCustomPropertyForSelectedItem, Source="{StaticResource MyViewModel}"}" />
 

Greetings,
Maya
the Telerik team

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

Tags
GridView
Asked by
Josef
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or