How to set grouping and alternate row css on the ej2 grid?

Hi,

I see there is a property to enable alternate rows (https://ej2.syncfusion.com/15.4.17/angular/documentation/grid/api-gridComponent.html#enablealtrow-boolean), but I don't see how to add custom css on this alternate row. Is there any way to do this?

Also, I'm not sure how to set grouping on an ej2 grid. I found some old examples but they don't seem to work anymore.

Tony

1 Reply

MF Mohammed Farook J Syncfusion Team May 1, 2018 10:50 AM UTC

Hi Tony, 

Thanks for contacting Syncfusion Supports. 


  1. You can able to customize the Grid alternative row color by the help custom css of  ‘.e-grid .e-altrow’ selector’s. Please find the code example and documentation link for your reference.


Code example 


<style> 
    .e-grid .e-altrow { 
        background-color: #fafafa; 
    } 
</style> 




  1. To enable Grouping in the grid, set the ‘allowGrouping’ as true  and also you  need to inject and ‘Group Service’  in your AppModule  Please find the demo link



Regards, 
J. Mohammed Farook 




Loader.
Up arrow icon