Forum


23:16

25/04/2012

I have been having some success with jqgrid. I am using version 4.3.2
I am able to create the grid in the document ready function and it works well, using:
$(document).ready(function(){
$("#resultsTable").jqGrid({
url:'mycontroller/myfunction',
mtype : "GET",
datatype: "json",
loadonce: true,
......(more jqgrid definitions here).....
});
});
The problem I am encountering is refreshing/reloading the grid.
For example if I define a new array:
myDataR= [
{Date:"2000-11-01", CoName:"name1", Type:"Re"},
{Date:"2000-11-01", CoName:"name2", Type:"Le"},
{Date:"2000-11-01", CoName:"name3", Type:"Ce"},
]
and try to populate the grid with the data using:
$("#resultsTable").jqGrid('setGridParam',{data:mydataR}).trigger('reloadGrid');
nothing happens.
I have also tried using:
$("#resultsTable").jqGrid.addRowData("1", mydataR);
which also does not work.
Please help.
01:47

25/04/2012

I was able to reload the grid successfully with trigger.('reloadGrid'), BUT only if I comment out the line:
loadonce=true,
I need the loadonce=true in order for the sorting and filtertoolbar to work....so how can I enable the grid to support both functionality? ie, ability to reloadGrid AND sort locally.
Most Users Ever Online: 715
Currently Online:
161 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66