jquery - How to change row color in Kendo UI Grid based on hidden column ID? -


i have kendogrid , have coupe hidden id columns, need change color of row when globalgrouplevel 0. not sure how because i'm generating grid external javascript file. have looked on kendo docs, show similar need using templates, when done in view , not external javascript file. ideas or direction out alot.

here grid

$("#cataloggrid").kendogrid({     datasource: {         data: catalogdata     },     columns: [        { field: "globalgroupid", title: "group id", hidden: true },        { field: "globalgrouplevel", title: "globalgrouplevel", hidden: true },        { field: "globalgroupname", title: "group name", width:350 },        { field: "isrequired", title: "!", width:20 },        { field: "optionname", title: "option name" }     ],     change: function (e) {      },     scrollable: true,     pageable: false,     selectable: "row",     height: 500 }); 

you can use grid databound event this. see dojo made you.

databound: function(e) {   var data = this.datasource.data();   $.each(data, function (i, row) {     if (row.get("globalgrouplevel") == 0) {         var element = $('tr[data-uid="' + row.uid + '"] ');         element.addclass("colored-row");     }   }); } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -