jqGrid 触发器“正在加载..."覆盖 [英] jqGrid trigger "Loading..." overlay

查看:33
本文介绍了jqGrid 触发器“正在加载..."覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何触发加载网格时显示的股票 jqGrid正在加载..."覆盖?我知道我可以毫不费力地使用 jquery 插件,但我希望能够使我的应用程序的外观与 jqGrid 中已使用的外观保持一致.

Does anyone know how to trigger the stock jqGrid "Loading..." overlay that gets displayed when the grid is loading? I know that I can use a jquery plugin without much effort but I'd like to be able to keep the look-n-feel of my application consistent with that of what is already used in jqGrid.

我发现的关闭是这样的:

The closes thing I've found is this:

jqGrid 显示默认值"加载"更新表格时/自定义更新时的消息

  • n8

推荐答案

如果你正在寻找类似 DisplayLoadingMessage() 函数的东西.它在 jqGrid 中不存在.您只能将 jqGrid 的 loadui 选项设置为 enable(默认)、disableblock.我个人更喜欢block.(参见 http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options).但我认为这不是你想要的.

If you are searching for something like DisplayLoadingMessage() function. It does not exist in jqGrid. You can only set the loadui option of jqGrid to enable (default), disable or block. I personally prefer block. (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options). But I think it is not what you wanted.

如果您喜欢来自 jqGrid 的正在加载..."消息,您唯一能做的就是制作相同的消息.我将在这里解释 jqGrid 为显示此消息所做的工作:将创建两个隐藏的 div.如果您有一个 id=list 的网格,则此 div 将如下所示:

The only thing which you can do, if you like the "Loading..." message from jqGrid, is to make the same one. I'll explain here what jqGrid does to display this message: Two hidden divs will be created. If you have a grid with id=list, this divs will look like following:

<div style="display: none" id="lui_list"
     class="ui-widget-overlay jqgrid-overlay"></div>
<div style="display: none" id="load_list"
     class="loading ui-state-default ui-state-active">Loading...</div>

文本Loading..."或Lädt..."(德语)来自 $.jgrid.defaults.loadtext.div 的 id 将由lui_"或load_"前缀和网格 id(list")构成.在发送 ajax 请求之前,jqGrid 使这个 div 中的一个或两个可见.如果 loadui 选项是 enable,它会为第二个 div (id="load_list") 调用 jQuery.show() 函数.但是,如果 loadui 选项是 block,则两个 div(id="lui_list" 和 id="load_list")都将根据 .show() 函数.ajax 请求结束后 .hide() jQuery 函数将被调用为一个或两个 div.就是这样.

where the text "Loading..." or "Lädt..." (in German) comes from $.jgrid.defaults.loadtext. The ids of divs will be constructed from the "lui_" or "load_" prefix and grid id ("list"). Before sending ajax request jqGrid makes one or two of this divs visible. It calls jQuery.show() function for the second div (id="load_list") if loadui option is enable. If loadui option is block, however, then both divs (id="lui_list" and id="load_list") will be shown with respect of .show() function. After the end of ajax request .hide() jQuery function will be called for one or two divs. It's all.

你会在ui.jqgrid.cssjquery-ui-1.8.custom.css中找到所有css类的定义.

You will find the definition of all css classes in ui.jqgrid.css or jquery-ui-1.8.custom.css.

现在你有足够的信息来重现 jqGrid正在加载..."消息,但如果我是你,我会再想一想你是否真的想要这样做,或者 jQuery blockUI 插件 更适合您的目标.

Now you have enough information to reproduce jqGrid "Loading..." message, but if I were you I would think one more time whether you really want to do this or whether the jQuery blockUI plugin is better for your goals.

这篇关于jqGrid 触发器“正在加载..."覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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