<div class="jb51code">
<pre class="brush:js;">
onLoadSuccess : function(data) {
rush:js;">
if(!data.success){
//
添加一个新数据行,第一列的值为你需要的
提示信息,然后将其他列合并到第一列来,注意
修改colspan参数为你columns配置的总列数
$(this).datagrid(
'appendRow',{
portId : '
'
}).datagrid('mergeCells',{
index : 0,field : 'portId',colspan : 7
})
//隐藏
分页导航条,这个需要熟悉datagrid的html结构,直接用jquery操作DOM对象,easyui datagrid没有提供相关
方法隐藏导航条
$(this).closest('div.datagrid-wrap').find(
'div.datagrid-pager').hide();
}
PS:解决easyui表格加载时候的列标题和列内容无法严格对齐的问题!
无法对齐 在表格加载中添加设置
rush:js;">
onLoadSuccess : function(data) {
$('span.datagrid-sort-icon').hide();
}
以上所述是小编给大家介绍的jQuery Easyui加载表格出错时在表格中间显示自定义的提示内容。编程之家 jb51.cc 收集整理的教程希望能对你有所帮助,如果觉得编程之家不错,可分享给好友!感谢支持。