开发者

Replace default message "Loading..." to Image "Loading.gif" at JQGrid footer

开发者 https://www.devze.com 2023-03-19 20:05 出处:网络
Experts, 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.

Experts,

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.

Is this possible to implement this?

I have also attached screen shot for more clarity.

Replace default message "Loading..." to Image "Loading.gif" at JQGrid footer

Updated JQGrid footer HTML

Replace default message "Loading..." to Image "Loading.gif" at JQGrid footer

Thanks,

Imdadhu开发者_Python百科sen


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

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>

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

Replace default message "Loading..." to Image "Loading.gif" at JQGrid footer

See the corresponding demo here.

0

精彩评论

暂无评论...
验证码 换一张
取 消