Half-highlighted rows in a Telerik RadGrid

I worked on an issue where, inside a Telerik RadGrid control, we changed the background color  of rows that had an error status to red. Our normal behavior was selected rows was changing the background color to blue.  The problem was that when selecting one of these rows in error, the line would split – half would be red, and half would be blue. Not attractive.

Blessed be the Telerik forums, for they led me to write this little snippet of code.

<style type="text/css">
    div.RadGrid_Windows7 .rgSelectedRow  
    {
        background: none #D6EBFF;
    }
 </style>

For the longest time, I couldn’t get the issue working, but as the blog post mentions, I put the “div” in front of the style, and that was the key. Once I did that, the style had precedence and it worked!

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: