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

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

3 Answers 264 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Somasekharan
Top achievements
Rank 1
Somasekharan asked on 29 Nov 2012, 12:12 PM
Hi.

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

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 29 Nov 2012, 02:22 PM
Hello,

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

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Tommy
Top achievements
Rank 1
answered on 03 May 2016, 05:53 PM

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

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

0
Stefan
Telerik team
answered on 04 May 2016, 11:56 AM
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
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
Somasekharan
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Tommy
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or