Forum


20:01

09/11/2009

I didn't find in the forum and in the demo one full example how to use the updateGridRows method (thank you, I already read the doc).
I would like to evict the flickering on reload.
I suppose, for each row of the grid, I must extract the id and compare the same row in the received postdata.
If the ids are equal then I must update the row of the grid with updategridrows.
In order to do all these things I must declare one function as datatype.
Is it the good method ?
12:08

Moderators
30/10/2007

Hello,
IMHO not a desired solution
The purpose of updateGridRows is to update data with equal id's and to to add new one.
Some possible solution
$("#grid").jqGrid({
...
loadonce:true,
...
});
then for your solution
setInterval( function(){
$.ajax({
....
complete: function(response, status) {
// get your data here and pass it to the grid
$("#grid").updateGridRows(...);
}
});
},2000);
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:28

Moderators
30/10/2007

Hello,
Which other people do not understand this?
The method is standart jqGrid method and there is nothing something special.
The method is applied to specified grid with parameter array and the name of the id row.
Is something that you do not understand?
The passed array replaces the data in the grid if it find the id.
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:58

27/10/2010

Hi,
tony, you say "The purpose of updateGridRows is to update data with equal id's and to to add new one."
Do you mean that if it finds the row it updates it and if it does not it adds it to the grid? Because I tried using it and it does update correctly, buit it does not add new row if id is not found. Is there any functionality fo this ( update or add if not found at the same time)?
Thank you in advance.
Most Users Ever Online: 715
Currently Online:
54 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