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

Mouse Selection vs Programmatic selection

2 Answers 24 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 17 Jan 2013, 08:57 PM
I am using the RadGridView from Rad controls 2012 Q3

I see to different behaviours for selection:
-When I click on an item with the mouse, the row is highlighted (in orange) 
-When I programmatically set the selection (myGridView.SelectedItem = anObject), the row is highlighted (in grey)

I would like to be able to programmatically set the selection AND have it be highlighted (as is the case with the mouse click)

a) Why these behaviours are different?
b) How can I programmatically set the selection AND have it be highlighted?

Note: I am not trying to change the selection colors, but have programmatic selection behave the same as mouse selection.

Thank you

2 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 18 Jan 2013, 07:30 AM
Hello

I would suggest you to please check this forum thread where a similar matter has already been discussed.

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mark
Top achievements
Rank 1
answered on 21 Jan 2013, 09:33 PM
Thank you for your help.

I did not realize this was a focus issue.  Now I see that then the grid view is in focus the selection is orange and when it is not in focus, it is grey.

Ok, now, when I progammatically set the selection (via a button click) I simply set Grid view to have focus and it looks just like I clicked it with the mouse

Thank you for your help
Tags
GridView
Asked by
Mark
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Mark
Top achievements
Rank 1
Share this question
or