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

Change row highlight color programmatically?

1 Answer 143 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 12 Aug 2010, 04:45 PM
Hi, what I am trying to do is highlight a row for just a second when a button is clicked in that row.  I do this by changing the background color, it seems to be working but the problem is the row is also highlighted so you can't really see the background.  Is there a way to either programmatically turn off the highlighting (I can turn it back on when the background color resets), or just change the highlight color.

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 13 Aug 2010, 03:56 PM
Hello Kjell,

That is normal behaviour,because if you take a look at the ControlTemplate of a a GridViewRow,you can see several brushes that are used when a row becomes selected,when the mouse hovers it and so on.
If you want to turn off the highlighting you could create your own RowStyle  and changing the default brushes in the way you need.
Attached is a sample project that demonstrates this approach.
Please let me know if you need any further assistance.

Sincerely yours,
Vanya Pavlova
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
Kjell
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or