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

Grid Item and Alternate rows style not working

1 Answer 154 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ismail
Top achievements
Rank 1
Ismail asked on 03 Oct 2011, 03:28 PM
I have change the style fot the rows + alt rows in the aspx not by CSS
but it is not working though I could change the grid header font and size but cant change its back color
in rows+ alt rows nothing only the horizontal alignment works nothing else working
what  am I doing wrong?

 

<HeaderStyle BackColor="#004000" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Font-Size="XX-Small" ForeColor="Black" HorizontalAlign="Center" />

 

 

<ItemStyle BackColor="#E0E0E0" Font-Size="XX-Small" ForeColor="SpringGreen" HorizontalAlign="Center" />

 

 

<AlternatingItemStyle BackColor="Silver" Font-Bold="False" Font-Names="Arial" Font-Size="XX-Small"

 

 

ForeColor="RosyBrown" HorizontalAlign="Center" />

 


Ahmed

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 03 Oct 2011, 05:25 PM
Hello Ismail,

You can try the following CSS in order to change th background color of the header. The problem in your approach was that it is not removing the background image used by grid built-in skins.
<style type="text/css">
       div.RadGrid_SkinName .HeaderStyle
       {
           background: black;
           border-style: solid;
           border-width: 1px;
           font-size: xx-small;
       }
   </style>

Additionally, I am sending you a sample project which demonstrates how you can achieve your goal.

Best wishes,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Ismail
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or