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

Rad Grid Selected Row Style

2 Answers 214 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kollam2003
Top achievements
Rank 1
kollam2003 asked on 03 Apr 2009, 04:24 AM
I have a rad grid.
For denoting the row selected i have given
 <SelectedItemStyle CssClass="SelectedStyle" />
Css:
 .SelectedStyle
     {
       background-image: url('..images/views.gif');
       background-repeat: no-repeat;
       background-position: top right;
 
     }
But this is not working
The grid is in the content page.
The css file is called in the master page.
Plz help





2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 03 Apr 2009, 08:08 AM
Hi,

I tried changing the background-color and found it working but unfortunately I am unable to change the background-image, but it is working fine when I try classic RadControl.

CSS:
<style type="text/css"
.SelectedStyle
    background-color: Green !important; 
</style> 

See the online demo.
Selected rows style (ASP.NET)
Grid / Selected Rows Style (ASP.NET AJAX)

Thanks,
Shinu.
0
Dimo
Telerik team
answered on 03 Apr 2009, 08:43 AM
Hi Deepak,

You custom CSS rule has a specificity of 10, while the respecitve skin CSS rule has a specificity of 20. Please use specificity of 21 or more:

http://blogs.telerik.com/dimodimov/posts/08-06-17/How_To_Override_Styles_in_a_RadControl_for_ASP_NET_AJAX_Embedded_Skin.aspx

An alternative way is to use !important:

 .SelectedStyle
     {
       background-image: url('..images/views.gif')  !important;
       background-repeat: no-repeat  !important;
       background-position: top right  !important;
 
     }



Greetings,
Dimo
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
kollam2003
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or