SelectedChildItem

2 posts, 0 answers
  1. Josef
    Josef avatar
    1 posts
    Member since:
    Nov 2010

    Posted 25 Jan 2012 Link to this post

    Hello,
    how can I get the SelectedItem of a HierachyChildTemplate using MVVM and Binding?
    Regards
    Josef

  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 Jan 2012 Link to this post

    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 >>

Back to Top