How to set the row background color in Kendo UI Grid?

jquery, kendo-ui

Solution

You can use jQuery to set any CSS property of any HTML element. This includes table rows and background color. Here is something to get you started:

$("#gridSellIn tr").css("background-color", "red");

Refer to the jQuery documentation for further info:

- jQuery css

- jQuery selectors (check eq() and nth-child())

Problem

I have grid with 21 rows. My requirement is to set some of rows background color is Light Green(like 1,5,13 rows) is this possible to achieve. ``` $("#gridSellIn") .kendoGrid({ width: 1500, dataSource: data.d, resizable: true, selectable: true, rowTemplate: kendo.template($("#SellInrowTemplate").html()), height: 500, columns: [ { title: 'RevProduct Name', field: 'ProductName', width: '22%', sortable: true }, { title: 'Actuals', field: 'Actual', width: '8%', sortable: true }, ] }); ```

Original source