jqGrid-在网格中不提供数据消息? [英] jqGrid - supply no data message in the grid?

查看:75
本文介绍了jqGrid-在网格中不提供数据消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果当前搜索没有返回数据,则使用loadComplete回调向用户打印一条消息,指示没有数据.有没有一种方法可以将jqGrid配置为在网格内打印出无数据"消息?目前,我们将其打印在网格上方的div中,但希望它位于实际网格中.

If there was no data returned from our search currently we use the loadComplete callback to print out a message to the user to indicate that there is no data. Is there a way to configure jqGrid to print out a "no data" message within the grid? Currently we print it out in a div above the grid but would like it to be within the actual grid.

推荐答案

jqGrid仅在寻呼机区域的末尾并且仅在以下所有情况都发生的情况下显示没有要查看的记录"消息($.jgrid.defaults.emptyrecords)

jqGrid displays "No records to view" message ($.jgrid.defaults.emptyrecords) only at the end of the pager area and only in the case if all following take place

  • 您定义一个寻呼机
  • viewrecords: true
  • 当前记录计数(参数reccount)为0.
  • you define a pager
  • viewrecords: true
  • the current number of record counts (reccount parameter) is 0.

我不知道在网格数据区域内(在网格主体顶部)显示消息的任何标准"方式.在我看来,如果您需要这样的消息,则必须继续使用放置在网格主体上的div并将其隐藏/显示在loadComplete事件句柄内部.

It is unknown to me any "standard" way to display a message inside of grid data area (on top of the body of grid). It seems to me if you need such message you have to continue to use div placed over the grid body and hide/show it inside of loadComplete event handle.

这篇关于jqGrid-在网格中不提供数据消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆