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

Selected row highlighting?

1 Answer 95 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 22 Jun 2018, 08:46 PM

I have a grid in which each row has an error and hence shows up as pink/red.  That's as it should be, but the problem is that in this situation, it is impossible to tell which row(s) are selected.  Is there a way to change it so that even when all rows are in error the row selection is still visible?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 27 Jun 2018, 01:24 PM
Hi Brad,

The validation and the selection of the selected item are represented as a Border placed on top of the row. When you have validation its Border is on top of all other ones. To workaround this you can extract and modify the default template of the GridViewRow. In the extracted template you can navigate to a Border with x:Name="Background_Selected" and change the place with the Border with x:Name="Background_Invalid".

I have created a sample project which demonstrates this approach. Hope this information is helpful.

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Brad
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or