Stacked row background color

All I need to do is change the background color to say red.  Do I need to create a custom CSS for this or is there some way to assigned directly inline with the column definition.



7 Replies

MS Mani Sankar Durai Syncfusion Team February 2, 2018 11:57 AM UTC

Hi Michael, 

Thanks for contacting Syncfusion support.  

We have checked the query and to change the background color for stacked header row alone we suggest you to use css-class property of stacked header column in grid. Please refer the code example 
<style> 
  #Grid .header1,#Grid .header2{ 
      background-color:red; 
  } 
</style> 
<ej-grid id="Grid" allow-paging="true" show-stacked-header="true" datasource="ViewBag.datasource"> 
    <e-stacked-header-rows> 
        <e-stacked-header-row> 
            <e-stacked-header-columns> 
                <e-stacked-header-column css-class="header1" header-text="Order Details" column='@new List<string> {"OrderID"}'> 
                </e-stacked-header-column> 
                <e-stacked-header-column css-class="header2" header-text="Ship Details" column='@new List<string> {"EmployeeID","ShipCity"}'></e-stacked-header-column> 
            </e-stacked-header-columns> 
        </e-stacked-header-row> 
    </e-stacked-header-rows> 
    <e-columns> 
... 
    </e-columns> 
</ej-grid> 

Please refer the documentation link 

Please let us know if you need further assistance.  

Regards, 
Manisankar Durai. 



ML Michael Lambert February 2, 2018 09:25 PM UTC

Worked Thanks!


MS Mani Sankar Durai Syncfusion Team February 5, 2018 06:06 AM UTC

Hi Michael, 

We are happy to hear that your problem has been solved.  

Please let us know if you need further assistance.  

Regards, 
Manisankar Durai. 



ML Michael Lambert March 6, 2018 07:40 PM UTC

Though I noticed if a apply a Theme at the top,
<link rel='nofollow' href="~/lib/syncfusion-javascript/Content/ej/web/gradient-azure/ej.web.all.min.css" rel="stylesheet" />

the background color reverts to the theme color and not the css that is inline.  How do I make individual custom changes the background color?

Mike



FS Farveen Sulthana Thameeztheen Basha Syncfusion Team March 7, 2018 04:07 PM UTC

Hi Michael, 

We can reproduce your reported problem at our end. The reported problem occurs because the gradient-azure theme override the CSS property. So we suggested you to apply the below workaround to get rid of the problem. 

Please refer to the code example:- 
<style> 
    #Grid .header1, #Grid .header2 { 
            background-color: red; 
        } 
 
    .e-grid .e-headercell, .e-grid .e-grouptopleftcell { 
        background: #f9f9f9; 
    } 
    </style> 

Please get back to us if you need any further assistance. 

Regards, 

Farveen sulthana T 



ML Michael Lambert March 7, 2018 05:55 PM UTC

Worked, Thanks!


FS Farveen Sulthana Thameeztheen Basha Syncfusion Team March 8, 2018 10:23 AM UTC

Hi Michael, 
  
Thanks for your reply. We are glad to know that your reported problem has been resolved. Please get back to us if you need any further assistance. 
  
Regards, 
Farveen sulthana T 


Loader.
Up arrow icon