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

Select Cell Progamatically

1 Answer 42 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Scott Michetti
Top achievements
Rank 1
Scott Michetti asked on 02 Apr 2014, 02:49 PM
Hello, I'm trying to select a cell in code, " http://www.telerik.com/help/wpf/gridview-how-to-set-current-cell.html" but the grid does not seem to set it the way it would if a user clicked into the cell. The problem is that the focus rectangle moves to that cell, but the background stays on the previous cell. I'm only allowing selection by single cell, not the whole row so I don't know if that matters. Also, the SelectedCells IList is 0, but if a user selected the cell, the list would have that cell included in it. Do I need to do something else to make this work like a user clicking into the cell?

Thanks,
Scott

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 03 Apr 2014, 10:57 AM
Hello Scott,

If you want to programmatically select a cell, you need to add it into RadGridView's SelectedCells collection. Please check the Programmatic Selection help article for a reference.

Regards,
Yoan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Scott Michetti
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or