Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Programtically show the "Loading" box
12/11/2009
19:27
Avatar
GrantDG
New Member
Members
Forum Posts: 2
Member Since:
13/11/2009
sp_UserOfflineSmall Offline

I have a process that goes as follows:

  1. User clicks a button which updates some data on the back end - (this is a slowish process),
  2. Once data is updated, a callback is fired which reloads the Grid data

Currently, the "Loading" box only shows at step 2 - I'd like to trigger it at step 1, to give the user some feedback.

I can't find a public method to achieve this - but maybe I'm missing something.

Anyone with a usggestion for how to achieve this?

Using v3.6

15/11/2009
00:55
Avatar
Ballresin
Member
Members
Forum Posts: 4
Member Since:
15/11/2009
sp_UserOfflineSmall Offline

I'm relatively new to jqGrid, so bear with me if this isn't the right way...

I'm firing a line of code on document ready to trigger my loading indicator div's visibility. My element #loadingindicator is a div that has a gif and some text to provide the user with feedback. This is really great because it triggers every time I run an Ajax call, letting the user know to be patient.

Hope it helps. Code below.

$(document).ready(function() {

$('#loadingindicator').ajaxStart(function(){$(this).show();}).ajaxStop(function(){$(this).hide();});

...other code...

}

15/11/2009
01:26
Avatar
GrantDG
New Member
Members
Forum Posts: 2
Member Since:
13/11/2009
sp_UserOfflineSmall Offline

I want to use the jqGrid Loading box (if possible), not a separate indicator.

15/11/2009
13:31
Avatar
Ballresin
Member
Members
Forum Posts: 4
Member Since:
15/11/2009
sp_UserOfflineSmall Offline

Then just trigger the grid's built-in 'Loading…' div's visibility.

The element ID with 3.6 for me is 'load_gridledgertable'... yours is probably 'load_<nameoftable>'

New code below.

$(document).ready(function() {

$('#load_gridledgertable').ajaxStart(function(){$(this).show();}).ajaxStop(function(){$(this).hide();});

…other code…

}

17/11/2009
02:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

There is a way to do this, but if you use formedit module the indicator will not show (it will be behind the form). Also I suggest you to use the new ajax settings and construct your own indicator. See what is new in 3.6.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
56 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information