SelectedItem is not selected when user clicks on expand button in Hierarchical RadGridview in WPF using MVVM

4 posts, 0 answers
  1. Somasekharan
    Somasekharan avatar
    9 posts
    Member since:
    Nov 2012

    Posted 29 Nov 2012 Link to this post


    I'm using a grid that has parent child heirarchy details using heirarchychildtemplate using MVVM and EF. There is a plus sign in the left-most column for the user to click on to expand the row. When the user clicks on a cell in the row, the details expand normally and the row is selected. But when the user just clicks on the plus sign, the row is expanded but the row does not get selected and SelectedItem is not changing. But according to our functionality, selected item should be updated when the user clicks on the expand button also. 

    Please give an idea how to change the selected item of the radgriew of the parent grid when the user clicks on the expand button of the left-most column of the gridview.

    I'm relatively new to WPF so apologies if I'm overlooking the obvious

    Thanks & Regards
    Somasekharan Thampi S
  2. Vlad
    Vlad avatar
    11100 posts

    Posted 29 Nov 2012 Link to this post


     You can bind IsSelected property of the row to IsExpanded property. I've attached an example project to illustrate you this. 

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Tommy
    Tommy avatar
    6 posts
    Member since:
    Apr 2012

    Posted 03 May 2016 in reply to Vlad Link to this post

    Could you please demo this in markup with, rather then xaml?

    I'm using Telerik UI for ASP.NET AJAX 2016.1.414

  4. Stefan
    Stefan avatar
    1073 posts

    Posted 04 May 2016 Link to this post

    Hi Tommy,

    As this forum section is for the Telerik UI for WPF suite, I would kindly ask you to post your question in the relevant one i.e, Telerik UI for ASP.NET AJAX.

    Thanks in advance for your cooperation.

    All the best,
    Stefan X1
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top