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
Problem with the 'reload grid'
11/10/2010
14:06
Avatar
noppem
Member
Members
Forum Posts: 5
Member Since:
15/04/2010
sp_UserOfflineSmall Offline

Hi,

I face problems with the reload grid.

This, with a link, works like a charm:

<a href="javascript:void(0)" id="r">reload</a>

jQuery('#list').click(function(){

  $('#list').jqGrid('setGridParam', {search: 'true'});

  $('#list').setPostDataItem('LANGUAGE_CODE', 'EN');

  $('#list').trigger('reloadGrid');
})

But if I put this in the loadComplete of the grid, the grid is not reloaded.

Even if I trigger the click from the loadComplete the grid is not updated.

But now if I call the javascript timeout function in the loadComplete, everything is fine… or not really because in the loadComplete we have the timout which reload the grid, then it comes in the loadComplete, and the timeout, which reload the grid, then it comes in the loadComplete… I'm sure it works, because I saw it every seconds -:) Laugh

More serious, does anybody have a little solution for me ? (without timeout ?)

Thank you in advance,

Michel

12/10/2010
16:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Not sure what you try to do – just see what is happen – if you call trigger("reloadGrid") in loadComplete – in this case you will loop endless since the loadComplete is called after the request is done and if the request is done you call trigerring the data again and again and …

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.

12/10/2010
17:35
Avatar
noppem
Member
Members
Forum Posts: 5
Member Since:
15/04/2010
sp_UserOfflineSmall Offline

Hi Tony,

Thank you for your answer.

You're right and it is better seen with the timeout function.

So as I want to change the filter params and reload the grid, where do I need to do it ?

Where do I need to put this code ?

  $('#list').jqGrid('setGridParam', {search: 'true'});

  $('#list').setPostDataItem('LANGUAGE_CODE', 'EN');

  $('#list').trigger('reloadGrid');})
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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