Post edited 15:03 – 18/07/2012 by Panciom
Hi to all and thank you for this great piece of code.
I'm trying to make a search page with the possibility to save parameters to recall the search later.
I use the following code to show the problem:
{
var grid_conf=jQuery("#find").jqGrid('jqGridExport',{exptype:"jsonstring"}); jQuery("#find").jqGrid('GridUnload'); jQuery("#find").jqGrid('jqGridImport',{ imptype: 'jsonstring', impstring: grid_conf }).trigger("reloadGrid"); }
When there are filter data (toolbar with stringResult:true or dialog search) the import fail with this error (from firefox console):
Data e ora: 18/07/2012 14.02.58
Errore: invalid property id
File sorgente:
https://blahblahblah/lib_js/jquery.jqGrid.min.js Riga: 30, Colonna: 372
Codice sorgente:
}, "beforeRequest":null, "beforeProcessing":null, "onHeaderClick":null, "viewrecords":true, "loadonce":false, "multiselect":false, "multikey":false, "editurl":null, "search":true, "caption":"Ricerca estesa consegne", "hidegrid":true, "hiddengrid":false, "postData":{ "_search":true, "nd":1342612973670, "rows":20, "page":1, "sidx":"delivery_id", "sord":"desc", "filters":{"groupOp":"AND","rules":[{"field":"delivery_id","op":"eq","data":"121"}]}, "searchField":"", "searchString":"", "searchOper":"" }, "userData":{ "success":true, "session_timeout":false, "message":"" }, "treeGrid":false, "treeGridModel":"nested", "treeReader":{}, "treeANode":-1, "ExpandColumn":null, "tree_root_level":0, "prmNames":{ "page":"page", "rows":"rows", "sort":"sidx", "order":"sord", "search":"_search", "nd":"nd", "id":"id", "oper":"oper", "editoper":"edit", "addoper":"add", "deloper":"del", "subgridid":"id", "npage":null, "totalrows":"totalrows" }, "forceFit":false, "gridstate":"visible", "cellEdit":false, "cellsubmit":"remote", "nv":0, "loadui":"enable", "toolbar":[ false, "" ], "scroll":false, "multiboxonly":false, "deselectAfterSort":true, "scrollrows":false, "autowidth":true, "scrollOffset":18, "cellLayout":5, "subGridWidth":20, "multiselectWidth":20, "gridview":false, "rownumWidth":25, "rownumbers":false, "pagerpos":"center", "recordpos":"right", "footerrow":false, "userDataOnFooter":false, "hoverrows":true, "altclass":"ui-priority-secondary", "viewsortcols":[ false, "vertical", true ], "resizeclass":"", "autoencode":false, "remapColumns":[], "ajaxGridOptions":{}, "direction":"ltr", "toppager":false, "headertitles":false, "scrollTimeout":40, "data":[], "_index":{}, "grouping":false, "groupingView":{ "groupField":[], "groupOrder":[], "groupText":[], "groupColumnShow":[], "groupSummary":[], "showSummaryOnHide":false, "sortitems":[], "sortnames":[], "summary":[], "summaryval":[], "plusicon":"ui-icon-circlesmall-plus", "minusicon":"ui-icon-circlesmall-minus" }, "ignoreCase":true, "cmTemplate":{}, "idPrefix":"", "recordtext":"Visualizzati {0} - {1} di {2}", "emptyrecords":"Nessun record da visualizzare", "loadtext":"Caricamento...", "pgtext":"Pagina {0} di {1}", "sortable":true, "useProp":true, "id":"find", "keyIndex":false, "localReader":{ "root":"rows", "page":"page", "total":"total", "records":"records", "repeatitems":false, "cell":"cell", "id":"id", "userdata":"userdata", "subgrid":{ "root":"rows", "repeatitems":true, "cell":"cell" } }, "width":1648, "tblwidth":1648, "disableClick":false, "_nvtd":[ 686, 20 ], "totaltime":54, "knv":null }})
Otherwise everything work as expected.
Notice that jsonstring data are exported and imported without any intervent. Maybe a bug???
I use jqGrid 4.4.0 and jQuery 1.7.2 and jQuery UI 1.8.21. For every test i'm here and thanky to all for all. Mirko