Forum

July 12th, 2025
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
Reload grid after error
01/04/2010
12:26
Avatar
griZZZly8
Member
Members
Forum Posts: 3
Member Since:
01/04/2010
sp_UserOfflineSmall Offline

Hello. I want to use grid in this scenario:

  1. Go to 'someurl' for data in json format.
  2. If 'someurl' return data - OK.
  3. BUT I can receive 404 or another error. Then wait 2 seconds and go to #1.

Now I'm calls trigger("reloadGrid") in loadError event. But it doesn't works.

P.S. Sorry for my english.

03/04/2010
17:10
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

For this purpose you can use loadError function something like

loadError : function(xhr, status, error) {

// check the error code her and then do

// trigger("reloadGrid")

}

Best 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.

05/04/2010
13:56
Avatar
griZZZly8
Member
Members
Forum Posts: 3
Member Since:
01/04/2010
sp_UserOfflineSmall Offline

Tony, here is some code

loadError: function(xhr, status, error) { trigger('reloadGrid'); }

it doesn't works.

05/04/2010
14:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Sorry for this. It should be

...

$("#mygrid").trigger("reloadGrid");

...

Best 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.

05/04/2010
15:10
Avatar
griZZZly8
Member
Members
Forum Posts: 3
Member Since:
01/04/2010
sp_UserOfflineSmall Offline

Some code again

loadError: function(xhr, status, error) { setTimeout("alert('ERROR');", 3000); $("#list").trigger('reloadGrid'); }

doesn't works. After 'reloadGrid' there is no request to server.

08/04/2010
12:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I will check this simulating the situation. In the meantime could you please enclose the trigger("reloadGrid") in setTimeout function as you do with the alert.

Thanks

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.

08/04/2010
16:30
Avatar
dash
Member
Members
Forum Posts: 4
Member Since:
08/04/2010
sp_UserOfflineSmall Offline

griZZZly8,

i ran into the same reload issue.  try adding datatype:"<whatever your datatype is" to your reload call might solve your issue.  it works for me...

jQuery("#groupsGrid").jqGrid().setGridParam({datatype:"xml"}).trigger("reloadGrid");

good luck,

dash

18/08/2010
15:56
Avatar
jalperin
Member
Members
Forum Posts: 8
Member Since:
18/08/2010
sp_UserOfflineSmall Offline

dash:

Your suggestion helped me with a similar problem.  reloadGrid wasn't working if loadonce was set to true, but by adding ...setGridParam({datatype:"xml"}).trigger("reloadGrid") it worked great!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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