JQGrid, change row background color based on condition

前端 未结 9 2123
予麋鹿
予麋鹿 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:44

    To paint the grid, use the function below. For example: PintarRowGrilla('#gridPreSeleccion', 3, 9, '#8FD9F1'); 9--> number of columns your grid:

    function PintarRowGrilla(idGrilla, idrow, nrocolumnas, color)
    {
        while(nrocolumnas > 0)
        {
            nrocolumnas--;
            jQuery(idGrilla).setCell(idrow, nrocolumnas, '', {
                'background-color': color
            });
        }
    }
    

提交回复
热议问题