jqGrid change row color on checkbox checked -


i have seen many answers here re this, none seem work me. , don't understand why? jqgrid 4.4.2

for checked boxes db:

gridcomplete: function() {     $("input:checkbox:checked").closest('tr').addclass("redbackground"); }, 

doesn't work, closest('td') or parent() change cell bg color!

and here on change:

$(document).on('change', "input[type='checkbox']", function(){     if($(this).is(":checked")){         $(this).parent().addclass("redbackground");      }else{         $(this).parent().removeclass("redbackground");       } }); 

this work cell, if change closest('tr') or parent().parent() - row color doesn't change

what missing?..

could row grouping?

groupingview : {         groupfield : ['date'],         groupcolumnshow : [true],         grouporder: ['desc'],         groupdatasorted : true     }, 

the best way set color or background color on row of grid based on data usage of rowattr callback. the answer provide example. approach use should in general work slowly. typical reason specify background-color in definition of class redbackground. standard jquery ui classes used jqgrid use background css instead. change background color of row have set background-image: none additionally background-color. other variation of setting color described in the answer.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -