This is a migrated thread and some comments may be shown as answers.

Change Row Background Colour

1 Answer 140 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Elliot
Top achievements
Rank 1
Elliot asked on 04 Jun 2015, 01:13 PM

How do I set the background colour of a row?  I have the following code for iterating through the rows but am unsure how to set a css class on the row.

    var items = grid.dataSource.data();
    for (var i = 0; i < items.length; i++) {
        if (items[i].dueDate != undefined && items[i].dueDate < today) {
            // make row background colour red

        }
    }

 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 04 Jun 2015, 03:35 PM
Hi Elliot,

Please check http://docs.telerik.com/kendo-ui/web/grid/how-to/style-rows-cells-based-on-data-item-values

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Elliot
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or