Forum



14:51

11/03/2010

1. Can't update local data array to the jqgrid.
The doc said:
Data Array A array that store the local data passed to the grid. You can directly point to this variable in case you want to load a array data. It can replace addRowData method which is slow on relative big data.
But this only work at the init time of the jqgrid. After the jqgrid is created, I try below:
var mydata = eval(evaluatingstr);
jQuery("#list3").clearGridData();
//jQuery("#list3").addRowData("rrid", mydata);
jQuery("#list3").setGridParam({data:mydata});
jQuery("#list3").trigger("reloadGrid");
But nothing happend and no error is reported.
The data array is correct, because if I use the "jQuery("#list3").addRowData("rrid", mydata);", it will add the data into the jqgrid correctly. I have tried remove the "rrid" column(which refer to the row number id column) from the array, but still can't get the data into the jqgrid.
So that means we can't use the "data" option and "setGridParam+trigger" to update the jgrid?
By the way, the addRowData is very slow, I have only 20 records.
2. Can't control the position of the formatter check alert box.
If you set a formmater check on a column, and in the cell edting mode, when you enter a wrong value, it will show an alert box, but the box's position is NOT at the center of the screen, but at a strange place of the left top coner. that make the user to lost their working eye site place, a very bad experience.
yours,
Ivan
19:49

10/11/2010

ivanchain said:
1. Can't update local data array to the jqgrid.
The doc said:
Data Array A array that store the local data passed to the grid. You can directly point to this variable in case you want to load a array data. It can replace addRowData method which is slow on relative big data.
But this only work at the init time of the jqgrid. After the jqgrid is created, I try below:
var mydata = eval(evaluatingstr);
jQuery("#list3").clearGridData();
//jQuery("#list3").addRowData("rrid", mydata);
jQuery("#list3").setGridParam({data:mydata});
jQuery("#list3").trigger("reloadGrid");But nothing happend and no error is reported.
The data array is correct, because if I use the "jQuery("#list3").addRowData("rrid", mydata);", it will add the data into the jqgrid correctly. I have tried remove the "rrid" column(which refer to the row number id column) from the array, but still can't get the data into the jqgrid.
So that means we can't use the "data" option and "setGridParam+trigger" to update the jgrid?
By the way, the addRowData is very slow, I have only 20 records.
2. Can't control the position of the formatter check alert box.
If you set a formmater check on a column, and in the cell edting mode, when you enter a wrong value, it will show an alert box, but the box's position is NOT at the center of the screen, but at a strange place of the left top coner. that make the user to lost their working eye site place, a very bad experience.
yours,
Ivan
Have you found your issue? We've begun to use 3.7.1 & your post helped me as I was not using the clearGridData but once I plugged it in things went smoothly.
thanks
My implementation:
function adjustRecipients() {
var rowID = 0;
RecipientData.length = 0;
for (var i in SelectedRecipients) {
RecipientData[rowID] = SelectedRecipients[i];
rowID++;
}$("#RecipientsTable").clearGridData();
$("#RecipientsTable").jqGrid('setGridParam', { data: RecipientData });
$("#RecipientsTable").trigger("reloadGrid");
Most Users Ever Online: 715
Currently Online:
47 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