Forum
19:36
27/11/2008
Hi,
I am using the jqGridExport/Import functions and have come across a potential bug when using postdata with setGridParam.
If I do a search with the grid and then hit the default reset/reload button on the pager, and then export my grid I get non-valid json in the form of:
...
"postData":{
"_search":false,
"nd":1266945818052,
"rows":5000,
"page":1,
"sidx":"BLDRM",
"sord":"asc",
"filters":"
},...
as you can see there appears to be an unescaped quote for filters
BUT if i create my own reset button using the code below:
jQuery("#showBuildings").setGridParam(
{
postData:
{
serialString : "status=1",
filters:null
},
page:1,
search:false
}
).trigger("reloadGrid");
I am able to get the export to function as expected:
...
"postData":{
"_search":false,
"nd":1266945392829,
"rows":5000,
"page":1,
"sidx":"BLDRM",
"sord":"asc",
"filters":null,
"serialString":"status=1"
},...
Any attempt to use filter:'' or filter:"" will cause the export to produce invalid json, only null seems to produce valid results.
does this seem like a bug to you?
thanks
billy
19:48
Moderators
30/10/2007
Hello,
I do not know which version do you use, but it is fixed in 3.6.4
http://github.com/tonytomov/jq.....8c8400b447
Best 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.
00:10
04/03/2010
Hello,
I'm using the 3.6.4 version of the jqGrid and also need to do exports of grid config, store it, and then reimport it at some later point.
The bug was fixed for the export, but when importing, the filter does not come right, the url takes the filter as [Object+object].
I had to quote the whole filters json string in single quotes at lines 163 to 166
if(gprm.postData.filters != undefined) {
ret=ret.replace(/filters":"/,'filters":\'');
ret=ret.replace(/}]}"/,"}]}'");
}
Hope this helps!
Genny
11:43
Moderators
30/10/2007
Hello,
Thanks for this. Yes we have tested the export, but not import.
Also will be fixed.
Thnaks again
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.
Most Users Ever Online: 715
Currently Online:
43 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