easyui datagrid无数据时显示横向滚动条

来源:互联网 发布:发型设计软件破解版 编辑:程序博客网 时间:2024/05/01 08:11
function scrollShow(datagrid) {    datagrid.prev(".datagrid-view2").children(".datagrid-body").html("<div style='width:" + datagrid.prev(".datagrid-view2").find(".datagrid-header-row").width() + "px;border:solid 0px;height:1px;'></div>");}

页面打开时执行此方法scrollShow($("#datagridID")),显示如下:

 

onLoadSuccess时判断一下,无数据继续调用此方法

if (data.rows.length > 0) {                    Utils.mergeCellsByFieldSingle("singleShipAccountQueryTable", "shipCargoNo,shipCargoSeqNo,clientNam,format,ieId,agentNam,cargoNam,cargoMark,materialNam,madeCom,billNum,billWgt,piecesWgt");                } else {                    scrollShow($("#singleShipAccountQueryTable"));                }


 

0 0
原创粉丝点击