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

How to apply styles

5 Answers 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Appu
Top achievements
Rank 1
Appu asked on 29 Jun 2009, 09:41 AM
Hi all
      Plz guide me in case how can i apply styles and colors in ordinary column heading.


Regards,
A.S

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 29 Jun 2009, 10:09 AM
Hi Appu,

You use the HeaderStyle Property to control the appearance of the header item in a gridtableview.

ASPX:
 
 
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
    <HeaderStyle Font-Bold="False" ForeColor="Red" /> 
    <MasterTableView DataSourceID="SqlDataSource1" TableLayout="Fixed" EditMode="PopUp" 
        CommandItemDisplay="Top" CellSpacing="-1"
        <EditItemStyle CssClass="Test" /> 
    </MasterTableView>     
</telerik:RadGrid> 

Thanks,
Shinu
0
Appu
Top achievements
Rank 1
answered on 29 Jun 2009, 11:28 AM
HI
        THanks.. But  i could not change the background color of header.

I gave : <HeaderStyle ForeColor="Yellow" BackColor="red" />

But is not working out..


regards,
AS
0
Pavlina
Telerik team
answered on 29 Jun 2009, 12:43 PM
Hello Appu,

Please apply the background styles for your RadGrid header cells as shown in the code snippet bellow:
CSS:
 <style type="text/css">  
        .RadGrid_SkinName .rgHeader  
        {  
            background: Red !important;  
            background-color: Red !important;  
        }  
        .RadGrid_SkinName .rgHeader a  
        {              
            color: Yellow !important;  
        }  
    </style> 

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Appu
Top achievements
Rank 1
answered on 29 Jun 2009, 02:23 PM
HI Pavlina
   Plz kindly guide me to how to apply that style sheets to the header section too. Since i dont have much knowledge about style sheets


regards,
appu
0
Pavlina
Telerik team
answered on 29 Jun 2009, 05:05 PM
Hi Appu,

Please find attached a simple runnable application that demonstrates the needed approach. Give it a try and see if it works for you as expected.

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Appu
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Appu
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or