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

[Solved] How to change style of GroupHeaderItem?

1 Answer 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Abhi Shinde
Top achievements
Rank 1
Abhi Shinde asked on 29 Sep 2011, 11:47 AM
Hi,

I am using Radgrid  and i want to change the style of GroupHeaderItem.
The skin of Radgrid is "SunSet". 

I just override telerik css class like -

.RadGrid_Sunset .rgGroupHeader td p{
    color:#FF6633 !important;
}

it is working fine. But is it efficient way to do that?

Thanks in advance...
Regards,
Abhi

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 Sep 2011, 12:20 PM
Hello Abhi,

Try the following code snippet to change the dtyle of GroupHeaderItem.
C#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
   if (e.Item is GridGroupHeaderItem)
     {
        GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;
        item.BackColor = System.Drawing.Color.Red;
     }
}

Thanks,
Princy.
Tags
Grid
Asked by
Abhi Shinde
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or