jqgrid 添加水平滚动条
$("#table_list_2").jqGrid({ url: loadDataUrl, mtype: 'GET', datatype: "json", editurl: 'remote', height: 520, autowidth: true, shrinkToFit: true, rowNum: 15, // editurl: 'clientArray', emptyrecords : "没有记录", viewrecords: true, rownumbers: true, //是否显示行号 multiselect: false, //是否有多选功能 multiSort: true, multiselect: true, //是否有多选功能 // -----------添加横向滚动条的属性 shrinkToFit:false, autoScroll: true, ..... })
//------------------------给jqgrid横向添加滚动条-------------------------------------------------------------
$("#table_list_2").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "scroll" });
注:$("#table_list_2")是指table的class,即
<div class="jqGrid_wrapper"> <table id="table_list_2"></table> <div id="pager_list_2"></div> </div>