Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

jquery

jqgrid

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.

enter image description here

Updated JQGrid footer HTML
enter image description here

Thanks,
Imdadhusen

like image 995
imdadhusen Avatar asked Jul 11 '11 06:07

imdadhusen


1 Answers

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

enter image description here

See the corresponding demo here.

like image 192
Oleg Avatar answered Sep 20 '22 23:09

Oleg