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

How to set the SelecteItem when a cell is clicked?

1 Answer 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Amy
Top achievements
Rank 1
Amy asked on 06 Jul 2010, 08:24 PM
We use the 2009 Q3 Rad control.  Also we use MVVM.  the SelectedItem is bound to prop in ViewModel.  When clicking on a GridViewdataColumn, the setter for SelectedItem is called and the row is highlighted, but for any CellTemplate is clicked,  the setter for SelectedItem is NOT called and the row is NOT highlighted.   Is any property I can set to make the row is selected when Clicking the cell?

Thanks!

Amy

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 Jul 2010, 07:03 AM
Hello Amy,

 In the click event of the control inside the CellTemplate you can use the control DataContext and assign this as RadGridView SelectedItem.

Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Amy
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or