JQGrid,需要更改进度消息“正在加载..." [英] JQGrid, Need to change progress message "Loading..."

查看:99
本文介绍了JQGrid,需要更改进度消息“正在加载..."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将JQGrid"Loading ..."消息更改为带有动画gif图像的内容.到处看,但找不到办法.任何人都可以.

I want to change JQGrid "Loading..." message to something with animated gif image. Looked everywhere but couldn't find a way. Anyone please.

推荐答案

尝试使用

.ui-jqgrid .loading { background: url(ajax-loader.gif); }

它应该工作.例如,可以从此处加载一些动画gif.顺便说一下,具有正在加载..."消息的div的格式为

it should work. Some animated gifs can be loaded for example from here. By the way, the div having "Loading..." message has the form

<div id="load_list" class="loading ui-state-default ui-state-active">Loading...</div>

其中的ID"load_list"将由前缀"load_"和表格元素的ID构成.

where the id "load_list" will be constructed from the prefix "load_" and the id of the table element.

已更新:要删除文本正在加载...",您可以使用

UPDATED: To remove the text "Loading..." you can either use loadtext:'' jqGrid option or overwrite $.jgrid.defaults.loadtext global setting from the grid.locale-en.js:

$.jgrid.defaults.loadtext='';

如果需要调整loading div的宽度,高度或任何其他CSS参数,则可以用相同的方法进行.例如,

If you need to adjust width, height or any other CSS parameter of the loading div you can do it in the same way. For example,

.ui-jqgrid .loading
{
    left: 45%;
    top: 45%;
    background: url(ajax-loader.gif);
    background-position-x: 50%;
    background-position-y: 50%;
    background-repeat: no-repeat;
    height: 20px;
    width: 20px;
}

这篇关于JQGrid,需要更改进度消息“正在加载..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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