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_Related Related Topics sp_TopicIcon
Prevent reloadGrid to empty the grid while waiting for remote request answer
27/03/2011
04:54
Avatar
itkin
paris
New Member
Members
Forum Posts: 1
Member Since:
27/03/2011
sp_UserOfflineSmall Offline

Hello,

I'd like to reload a grid with remote data as a background task, but it seems that the grid content is deleted before the ajax request is send.

Is there a simple way to update the grid content once the ajax request is complete,  in order to minimize the 'refreshing' time while the grid is empty ?

Thanks for your help !

itkin

28/03/2011
14:27
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

The old grid contain will be deleted inside of addJSONData internal function which will be called inside of $.ajax success handle.

Just for fun you can include in your jqGrid treeANode: -2 parameter and reset the parameter treeANode to -2 one more time in the loadComplete:

loadComplete: function(){
    this.p.treeANode=-2;

You will see that the old grid contain will not deleted by jqGrid and new contain will be just appended to the grid on every grid refresh.

It is not the way which I recommend you! It is just for playing. It shows only how the grid work and that the place is the only place where the grid contain will be deleted during refreshing.

If you grid work very slowly you should search for the problem in your code: For example: you don't use gridview:true jqGrid parameter or you use afterInsertRow event handle or you use any very slow actions inside of loadComplete/gridComplete event... I can continue.

Best regards
Oleg

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
44 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