Question

I'm working on WinForms project. I need to change color of radGrid header from blue to green. every thing that I found, is about Web not Windows Forms.

Can any one please tell me how this can be achieved?

Thanks

Was it helpful?

Solution

Heres what I use for what its worth.

in code objects edit like this.rgDailyResults.HeaderStyle =color.green or else you have tags in web and forms that control them like so:

<telerik:RadGrid ID="rgScenarioRollUps" AllowMultiRowSelection="True" AllowPaging="False" AllowSorting="False" Width="100px" AutoGenerateColumns="false" runat="server" Skin="">
    <HeaderStyle CssClass="propGridHeader" />
    <AlternatingItemStyle CssClass="propDarkGrid" />
    <ItemStyle CssClass="propLightGrid" />
    <SelectedItemStyle CssClass="propSelected" />

Edit This is what you wanted from telerik

http://www.telerik.com/help/winforms/

http://www.telerik.com/help/winforms/gridview-styling-and-appearance-changing-the-currentrow-indicator.html

the latter link explains changing the "header image"

OTHER TIPS

Try

GridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.Purple;

Try something like this:

C#

protected void radGrid_ItemDatabound(object sender, GridItemDataBoundEventArgs e)
{
    if (e.Item is GridHeaderItem)
    {
        var item = e.Item as GridHeaderItem;
        item.BackColor = Color.Green;
    }
}

ASPX:

<telerik:RadGrid ID="radGrid" runat="server" OnItemDataBound="radGrid_ItemDatabound">
[...]
</telerik:RadGrid>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top