您的位置:首页 > 产品设计 > UI/UE

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

2014-04-21 16:47 411 查看
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"));
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: