Forum
14:01
21/07/2009
/jqgridwiki/doku.php?id=wiki:upgrade_from_3.8_to_4.0.0
shows the replacement for setPostData and appendPostData, however, both replacement are exactly the same function.
jQuery(”#grid_id”).jqGrid('setGridParam',{postData:newdata})
This will always execute the equivalent of the old appendPostData, so it is not possible to do an setPostData
20:09
Moderators
30/10/2007
This is correct indeed. Try:
jQuery("#grid_id").jqGrid('setGridParam',{postData:{my_existing_key_in_postData:newvalue}});
Regards
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.
20:51
21/07/2009
Maybe I'm missing something but:
$("#grid").jqGrid('setGridParam',{postData:{id:1,text:'something'}})
result of postdata is:
id: 1
text: "something"
$("#grid").jqGrid('setGridParam',{postData:{id:1,text2:'something'}})
result of postdata is:
id:1
text:"something"
text2:"something"
while it should be:
id:1
text2:something
(this was the old behaviour of setPostData )
There should be a way to replace postData completely with new values, without preserving the old ones.
21:02
Moderators
30/10/2007
To mimic exactley the old behaviour do:
$("#grid").jqGrid("setGridParam",{postData:{}});
$("#grid").jqGrid("setGridParam",{postData:{ .. other values here..} });
Will update the docs
Regards
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.
22:50
Moderators
30/10/2007
Opps,
try to replace
$("#grid").jqGrid("setGridParam",{postData:{}});
with
$("#grid").jqGrid("setGridParam",{postData: null });
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.
11:30
21/07/2009
this works... but please, please, please keep jqGrid API changes to an absolute minimum... this has kept me busy for days (it was already hard to find what was wrong, let alone to find a way to fix it, and to run through all code to add an extra line)
what about the other cases? how about userdata?
Most Users Ever Online: 715
Currently Online:
30 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