JQGrid, change row background color based on condition

前端 未结 9 2093
予麋鹿
予麋鹿 2020-12-24 02:22

I have the following jqgrid that uses the jquery ui theme imported to my master page.

  $(\"#shippingscheduletable\").jqGrid({
            url: $(\"#shipping         


        
9条回答
  •  一整个雨季
    2020-12-24 02:57

    What about via Jquery Css.
    See code below to set rows with Inactive status to red. Grid name is jqTable.

    setGridColors: function() {
        $('td[title="Inactive"]', '#jqTable').each(function(i) {
            $(this).parent().css('background', 'red');
        });
    }
    

提交回复
热议问题