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
[HELP] "reloadGrid " doesNOT work :(
29/01/2010
09:15
Avatar
roka100
Member
Members
Forum Posts: 3
Member Since:
29/01/2010
sp_UserOfflineSmall Offline

Hi all

 I want to reload the grid when I clicked a button. But it doesnot reload data from server…and I got no javascript error with IE6.

Code:

 $("#btn_delete").click(function() {
    jQuery("#gridlist").jqGrid('setGridParam',{url:'http://192.168.244.93/test/xml.....p'}).trigger("reloadGrid");
 });

I write it in another way , but it doesnot request data from server at all.

 $("#btn_delete").click(function() {
    $("#gridlist").setGridParam({page:1}).trigger("reloadGrid");
 });

Loaded js libs are:

<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery-ui.min.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-jp.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/ajaxupload.js" type="text/javascript"></script>

By the way, SEARCH button and RELOAD button on the pager does not reload the grid , too...

Can anyone help me ? Thank you!

29/01/2010
11:07
Avatar
roka100
Member
Members
Forum Posts: 3
Member Since:
29/01/2010
sp_UserOfflineSmall Offline

Solved it myself.

Commented out this row:

//loadonce: true

15/07/2011
00:14
Avatar
rank1981
Quebec City, canada
New Member
Members
Forum Posts: 2
Member Since:
15/07/2011
sp_UserOfflineSmall Offline

That's great, it worked for me too...

thanks

Bu now, I can't sort my grid by a column without reloading the entire data???

Why is that?

How can I get the sort by click on the header AND the trigger("reloadGrid") to work?

18/07/2011
23:12
Avatar
rank1981
Quebec City, canada
New Member
Members
Forum Posts: 2
Member Since:
15/07/2011
sp_UserOfflineSmall Offline

Well, in case someone ever end up on this thread by a google search (as I did), I could'nt make the client side sort work after having added a filter to the list...

Apparently, you have to sort on server side if you remove the "loadonce: true,"

To do this, just add the folowing parameters to your ActionResult function: string sortField, string sortOrder

It automatically recieve the name of the column to sort by in sortField and the direction of the sort (asc or desc) in sortOrder...

It's slower than client side sorting, but it does it!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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