Hi Frederic,
Thanks for contacting Syncfusion support.
We have analyzed your query and we found that you want to change the background-color of Grid rows by using Boolean column value. So we suggest you to use row-data-bound event of the Grid to achieve you requirement. Please refer the following code example:
|
<ej-grid id="Grid" allow-paging="true" row-data-bound="bound" >
.....
<e-columns>
<e-column field="BError" header-text="BError"></e-column>
</e-columns>
</ej-grid>
<script>
function bound(args) {
if (args.rowData.BError == true) {
args.row.css("background-color", "red");
}
}
</script>
|
In this code we have checked BError column value while rendering the Grid rows by using the row-data-bound event. If the value is true, then we have changed that particular row background-color to red by using css method of the jQuery.
We have also prepared the sample with your requirement and that sample can be downloadable from the below link,
Please refer the following link to know about row-data-bound event of the Grid:
If you need further assistance please get back to us,
Regards,
Kuralarasan M.