jqgrid動態顯示/隱藏某一列

jQuery("#grid_id").setGridParam().showCol("colname").trigger("reloadGrid");

jQuery("#grid_id").setGridParam().hideCol("colname").trigger("reloadGrid");

--改變背景色ide

function setORStatusBg() {            
            var ids = $("#gvCustomerOrder").getDataIDs();
            for ( var i=0; i<ids.length;i++ ){
                var val = $("#gvCustomerOrder").getCell( ids[i],"STATUS" );
                var bkcolor = "#FFFFFF";
                if ( val == "20" ) bkcolor = "#add8e6";
                if ( val == "30" ) bkcolor = "#fbfb6e";
                if ( val == "40" ) bkcolor = "#50cb50";
                if ( val == "50" ) bkcolor = "#fb6666";
                if ( val == "60" ) bkcolor = "#6cfafa";
                if ( val == "70" ) bkcolor = "#b3b3b3";
                $("#gvCustomerOrder").setCell ( ids[i],"STATUS_NAME",'',{background:bkcolor});
            };
        }
相關文章
相關標籤/搜索