Friday 29 November 2013

How to set MVC kendo UI grid row cell background colour?


In this article I will how to set MVC kendo ui grid row cell background colour.

First we need to identity which column colour you want change.

See the below code for MVC KENDO UI grid row cell background colour.

function dataBound1(e) {
                        var i = 0;
                        dataView = this.dataSource.view();
if (dataView[i].bomc != dataView[i + 2].bomc) {
                                var uid = dataView[i].uid;
                                var uid1 = dataView[i].bomc;
                                var colName = $('#grid').find('th').eq(7).text()
                                $("#grid tbody").find("tr[data-uid=" + uid + "]").find("td:eq(" + 7 + ")").css("background-color", "yellow");
                            }
}

No comments:

Post a Comment