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

Background colour of grid header not working..

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
FISCAL
Top achievements
Rank 1
FISCAL asked on 03 Aug 2010, 04:04 PM
Hi,

why following code is not changing the header background color?
<HeaderStyle Font-Bold="true" BackColor="#FF9900"/>

Many thanks 
MG

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 06 Aug 2010, 07:30 AM
Hi M G,

By default the RadGrid header gets image from grid sprites and repeated it horizontally:
.RadGrid_Default .rgHeader, .RadGrid_Default th.rgResizeCol {
background:url("/Example/WebResource.axd?d=JSFPqlAaSqKUrTohMTfXqfrIw9LabHGFla0WzaxpulNQNTS10LWEADkRp2ZNLBYWeN8PKbUPdsOH-rYqycVtbQ2&t=634050632760000000") repeat-x scroll 0 -2300px #EAEAEA;
border-color:-moz-use-text-color -moz-use-text-color #828282;
border-style:none none solid;
border-width:0 0 1px;
}

To achieve the desired functionality you need to remove the background image from the header items. For example you could try setting the external css class to the MasterTableView.HeaderStyle-CssClass which remove the image:
<telerik:RadGrid runat="server" AllowAutomaticDeletes="true" AutoGenerateEditColumn="true" ID="RadGrid1" AutoGenerateColumns="false">
 <MasterTableView EditMode="InPlace" HeaderStyle-CssClass="test">
...
<style type="text/css">
 .test
 {
    background-image: none !important;
 }
</style>

Additionally I am sending you a simple example which demonstrates the desired functionality.

Regards,
Radoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
FISCAL
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or