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

查看:93
本文介绍了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 (默认), disable block .我个人更喜欢 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的"Loading ..."消息,则唯一可以做的就是制作相同的消息.在这里,我将解释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 ,则相对于.show()函数,两个div(id ="lui_list"和id ="load_list")都将显示.在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"Loading ..."消息,但如果您是我,我会再想一想您是否真的想这样做或

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天全站免登陆