替换默认消息“正在加载..."图片"Loading.gif"在JQGrid页脚 [英] Replace default message "Loading..." to Image "Loading.gif" at JQGrid footer

查看:323
本文介绍了替换默认消息“正在加载..."图片"Loading.gif"在JQGrid页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

专家

我已经在我的项目中成功实现了 JQGrid . 我的要求是,我想将默认消息正在加载..."替换为jqgrid页脚上的图片"Loading.gif" .

I have implemented JQGrid with successfully on my project. My requirement is i would like to replace default message "Loading..." to Image "Loading.gif" at jqgrid footer.

可以实现吗?

为了更加清晰,我还附上了屏幕截图.

I have also attached screen shot for more clarity.

更新了JQGrid页脚HTML

Updated JQGrid footer HTML

谢谢,
Imdadhusen

Thanks,
Imdadhusen

推荐答案

首先,我建议您阅读两个老答案:.

First of all I recommend you to read two old answers: this and this.

要使loading div显示动画gif而不显示任何文本,您应更改"loading"类的样式,例如

To have the loading div which displays an animated gif and no text you should change the style of the 'loading' class for example like

<style type="text/css">
    .ui-jqgrid .loading {
        background: url(loader1.gif);
        border-style: none;
        background-repeat: no-repeat;
    }
</style>

使用$.jgrid.defaults.loadtext=''删除默认文本"Loading ...",然后将"loading" div移至您要放置的位置.可能需要另外调整一些CSS样式.例如

remove the default text 'Loading...' with $.jgrid.defaults.loadtext='' and move the 'loading' div to the place where you want to have it. It con be needed to adjust some CSS styles additionally. For example

$("#load_list")
    .css({position:'relative',left:'0',float:'left',width:'4px',
          height:'4px','margin-top':'3px'})
    .prependTo('#pager_left');

最后,您会收到类似的东西

At the end you will receive something like

此处中查看相应的演示.

这篇关于替换默认消息“正在加载..."图片"Loading.gif"在JQGrid页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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