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

[Solved] how change header back color for each detailTable in RadGrid hierarchy?

3 Answers 375 Views
Grid
This is a migrated thread and some comments may be shown as answers.
samaneh
Top achievements
Rank 1
samaneh asked on 06 Mar 2011, 02:16 PM
hi all
I have 3 level Rad grid hierarchy.
I want each detail table has specific header backcolor.how can I do that?

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 07 Mar 2011, 05:53 AM
Hello Samaneh,

You can set different background color for each Header row in hierarchy by adding following CSS in your page.

ASPX:
<telerik:RadGrid ID="RadGrid1">
  <MasterTableView Name="Master" runat="server">
   <HeaderStyle CssClass="color1" />
       <DetailTables>
          <telerik:GridTableView Name="Detail2" runat="server" >
             <HeaderStyle CssClass="color2" />
                <DetailTables>
                  <telerik:GridTableView Name="Detail3" runat="server" >
                      <HeaderStyle CssClass="color3" />
                          .   .   .   .   .

CSS:
<style type="text/css">
        .color1
        {
            background-image: none !important;
            background-color: Red !important;
        }
        .color2
        {
            background-image: none !important;
            background-color: Blue !important;
        }
        .color3
        {
            background-image: none !important;
            background-color: Purple !important;
        }
    </style>

Thanks,
Princy.
0
samaneh
Top achievements
Rank 1
answered on 07 Mar 2011, 06:14 AM
Thank you Princy
0
Mohamed Yasin
Top achievements
Rank 1
answered on 24 Jul 2013, 07:20 AM
Thank you 
Tags
Grid
Asked by
samaneh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
samaneh
Top achievements
Rank 1
Mohamed Yasin
Top achievements
Rank 1
Share this question
or