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

Backcolor not changed

1 Answer 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 08 Nov 2011, 03:22 PM
using:

<HeaderStyle VerticalAlign="Bottom" Wrap="True" BackColor="Blue" />

the back color will not change.

 

<telerik:RadGrid AutoGenerateColumns="false" ID="grdPendingClaims" AllowSorting="True"
    GridLines="Both" OnSortCommand="grdPendingClaims_SortCommand" OnNeedDataSource="grdPendingClaims_NeedDataSource"
    Height="200px" Width="9in" runat="server" CellSpacing="0">
    <HeaderStyle VerticalAlign="Bottom" Wrap="True" BackColor="Blue" />
     <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="True" >
        </Scrolling>
    </ClientSettings>
    <ItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="25px" />
    <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" />
    <MasterTableView TableLayout="Auto" Width="100%" AllowNaturalSort="false" GridLines="Both" >
        <Columns>
            <telerik:GridBoundColumn HeaderText="Status" DataField="CurrentStatus" UniqueName="CurrentStatus"
                SortExpression="CurrentStatus"
                ShowSortIcon="False" ShowFilterIcon="False" ReadOnly="True" AllowFiltering="False">     
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="ClaimID" DataField="ClaimID" UniqueName="ClaimID"
                SortExpression="ClaimID" Visible="False" ShowSortIcon="False"
                ShowFilterIcon="False" ReadOnly="True" AllowFiltering="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Claim Number" DataField="ClaimNumber" UniqueName="ClaimNumber"
                SortExpression="ClaimNumber"
                ShowSortIcon="False" ShowFilterIcon="False" ReadOnly="True" AllowFiltering="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="MemberID" DataField="MemberID" UniqueName="MemberID"
                SortExpression="MemberID" Visible="False"
                ShowSortIcon="False" ShowFilterIcon="False" ReadOnly="True" AllowFiltering="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Member Name" DataField="Member Name" UniqueName="Member Name"
                SortExpression="Member Name" ItemStyle-Wrap="False"
                ShowSortIcon="False" ShowFilterIcon="False" ReadOnly="True" AllowFiltering="False">
                <ItemStyle Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Start Date" DataField="BeginDate" UniqueName="BeginDate"
                SortExpression="BeginDate" DataType="System.DateTime"
                ItemStyle-Wrap="False" DataFormatString="{0:MM/dd/yyyy}" ShowSortIcon="False"
                ShowFilterIcon="False" ReadOnly="True" AllowFiltering="False">
                <ItemStyle Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="End Date" DataField="EndDate" UniqueName="EndDate"
                SortExpression="EndDate" DataType="System.DateTime"
                ItemStyle-Wrap="False" DataFormatString="{0:MM/dd/yyyy}" ShowSortIcon="False"
                ShowFilterIcon="False" ReadOnly="True" AllowFiltering="False">
                <ItemStyle Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Units" DataField="Units" UniqueName="Units"
                SortExpression="Units"
                DataType="System.Int32" DataFormatString="{0:###,##0}"
                ShowSortIcon="False" ShowFilterIcon="False" ReadOnly="True" AllowFiltering="False">
                <ItemStyle HorizontalAlign="Right" Wrap="False" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Division" DataField="Division" UniqueName="Division"
                SortExpression="Division"
                ShowSortIcon="False" ShowFilterIcon="False" ReadOnly="True" AllowFiltering="False">
                <ItemStyle HorizontalAlign="Center" Wrap="False" />
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 08 Nov 2011, 05:44 PM
Hi John,

You can try the following CSS in order to change th background color of the header. The problem in the other approach was that it is not removing the background image used by some of the grid built-in skins.
<style type="text/css">
    div.RadGrid_[SkinName] .rgHeader,
    div.RadGrid_[SkinName] th.rgResizeCol
    {
        background: Blue;
    }
 </style>

Greetings,
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
John
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or