Hi Zack,
Thanks for contacting Syncfusion support.
We can also change the background-color for specific row in Angular 2 grid component using rowDataBound event in Grid. In this event, we can get the row details and row data for each single row. So, we can use this event and check the condition for change the back-ground color to specific row. Please refer to the code example and Help documentation for more information,
Code example:
@Grid
<ej-grid #grid [dataSource]="gridData" [allowPaging]="true" (rowDataBound)= "rows($event)" >
<e-columns>
. . .
</e-columns>
</ej-grid>
export class AppComponent {
. . .
rows(e:any){
var rowDetails = e.row; // Get the row
//check the condition for specific value
if(e.data.EmployeeID == 5)
rowDetails.css("background-color", "black").css("color", "white"); // change the BG color for specific rows
}
. . .
} |
Screenshot:
Regards,
Venkatesh Ayothiraman.