问题描述
专家
我已经在我的项目中成功实现了 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页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!