Why does the SelectedItem ist sometimes only have a border like in the other screen-shot (NotOK.png).
I want a behavior like in a ListBox where some item is always "active" (i.e. selected).
3 Answers, 1 is accepted
I have the same problem when I set the property that CurrentItem is bound to (MVVM).
The grid row does not get highlighted (as if clicked on) but instead gets a hard to see rectangle around it.
(EnableLostFocusSelectedState does not work as it hasn't lost focus)
Is there a property I need on the xaml to tell it to highlight the row the same as if clicked on when changed via code?
This probably means that the grid has lost the focus at that moment. The selection in RadGridView has two visual states - one for the case when the control is focused and another for the case when it is not. When the gridview is focused, the selected row gets a color based on the specific theme, and when unfocused, the row usually uses a gray color variation. To disable the unfocused selected state, you can set the EnableLostFocusSelectedState property to False.
If this doesn't work as you mentioned previously, I would recommend you to upload a project showing the issue.
It might be just a shot in the dark but could you try setting the EnableLostFocusSelectedState property of RadGridView to "False". For more information about this property you can check the Stop Showing the Unfocused State documentation article. However, if that is not helping, could you please provide us with more information about your case? Perhaps some code snippets with how everything is defined and a screen-cast that will illustrate the steps to reproduce the behavior.
We are looking forward to your reply.
Regards,
Boris Penev
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.
It did the trick. My current row remains nicely highlighted - wherever the focus moves.