<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: jqGrid export and import fail with an error...</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Panciom on jqGrid export and import fail with an error...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error#p27617</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error#p27617</guid>
        	        	<description><![CDATA[<p>How can i tell jqgrid developer about this bug?</p>
<p>Can someone help me/us?</p>
<p>This evening will try jqgrid 4.4.1 to see if the problem is still there.</p>
</p>
<p>Thank you to everyone and in particular HGWheels for give me a simple and fast solutions.<strong>&#160;</strong></p>
</p>
<p><strong><br /></strong></p></p>
]]></description>
        	        	<pubDate>Wed, 24 Oct 2012 15:18:12 +0300</pubDate>
        </item>
        <item>
        	<title>HGWheels on jqGrid export and import fail with an error...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error#p27079</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error#p27079</guid>
        	        	<description><![CDATA[<p>I did some additional troubleshooting this morning and I think I have pinpointed the issue.</p>
</p>
<p>When the jqGridExport method is called and type jsonstring is used the "filters" section looks like this:</p>
<blockquote>
<p>"filters":{"{"groupOp":"AND","rules":[{"field":"param1","op":"eq","data":"data1"},{"field":"param2","op":"cn","data":"data2"}]}"}</p>
</blockquote>
<p>However the string should look like this:</p>
<blockquote>
<p>"filters":<span style="color: #ff0000;">"</span>{"{"groupOp":"AND","rules":[{"field":"param1","op":"eq","data":"data1"},{"field":"param2","op":"cn","data":"data2"}]}"}<span style="color: #ff0000;">"</span></p>
</blockquote>
<p>Notice that the export function is not placing the filters inside of double quotes.&#160; This is causing the jqGridSetParam method to try and interpret the &#39;&#39; escape characters.&#160; Additionally if you were to remove the escape characters, then once the data is posted to the server the "filters" parameter is interpreted as json and is no longer valid.&#160; We want the entire string posted to the server not the json structure.</p>
</p>
<p>I believe the offending lines from grid.import.js are 185 &#38; 186:</p>
<blockquote>
<p>&#160;&#160; ret=ret.replace(/filters":"/,&#39;filters":&#39;);<br />&#160;&#160; ret=ret.replace(/}]}"/,&#39;}]}&#39;);</p>
</blockquote>
<p>I temporarily resolved the problem by doing a search/replace on the jqGridExport jsonstring with the following:</p>
<blockquote>
<p>s/"filters":{/"filters":"{/gi</p>
<p>s/"}]}/"}]}"/gi</p>
</blockquote>
<p>Someone with more experience with the jqGrid structure may need to make/advise on the source fix to resolve this issue.</p>
]]></description>
        	        	<pubDate>Mon, 06 Aug 2012 16:46:15 +0300</pubDate>
        </item>
        <item>
        	<title>HGWheels on jqGrid export and import fail with an error...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error#p27077</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error#p27077</guid>
        	        	<description><![CDATA[<p>Just wanted to throw my hat into this ring as well.&#160; I am using jqGrid 4.4.0, jQuery 1.7.2, and jQuery UI 1.8.18.&#160;</p>
</p>
<p>When using jqGridExport and jqGridImport the operation fails when there is filter data set.&#160; I am doing</p>
<p>multipleSearch: true and multipleGroup: true in my config.&#160; I can also confirm that when there are no filters</p>
<p>applied the string produced by jqGridExport is successfully imported by jqGridImport as one would expect.&#160;</p>
<p>When a filter is applied then jqGridExport ceases to properly be imported by jqGridImport.&#160; I am making sure to</p>
<p>unload the grid using jqGrid(&#39;GridUnload&#39;) before calling jqGridImport.&#160; Also I am not changing/formatting the string</p>
<p>produced by jqGridExport in any way.&#160; As posted by panciom above I receive the same error when trying to</p>
<p>perform the import "invalid property id".&#160; For what it is worth I have tested this with jsonstring and xmlstring</p>
<p>and both produce the same error.&#160; It would seem that the output of jqGridExport is not properly escaping</p>
<p>characters when multipleSearch and multipleGroup are both turned on.</p>
]]></description>
        	        	<pubDate>Mon, 06 Aug 2012 14:52:00 +0300</pubDate>
        </item>
        <item>
        	<title>Panciom on jqGrid export and import fail with an error...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error#p26970</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-export-and-import-fail-with-an-error#p26970</guid>
        	        	<description><![CDATA[<p>Hi to all and thank you for this great piece of code.</p>
</p>
<p>I&#39;m trying to make a search page with the possibility to save parameters to recall the search later.</p>
<p>I use the following code to show the problem:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1878' value='Select Code' data-codeid='sfcode1878' /></p>
<div class='sfcode' id='sfcode1878'>
<p>{</p>
<pre>&#160;&#160;&#160; var grid_conf=jQuery(&#34;#find&#34;).jqGrid(&#39;jqGridExport&#39;,{exptype:&#34;jsonstring&#34;});<br /><br />&#160;&#160; &#160;jQuery(&#34;#find&#34;).jqGrid(&#39;GridUnload&#39;);<br />&#160;&#160; &#160;<br />&#160;&#160; &#160;jQuery(&#34;#find&#34;).jqGrid(&#39;jqGridImport&#39;,{<br />&#160;&#160; &#160;&#160;&#160; &#160;imptype: &#39;jsonstring&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;impstring: grid_conf<br />&#160;&#160; &#160;}).trigger(&#34;reloadGrid&#34;);<br />}</pre>
</div>
<pre><br /><br />When there are filter data (toolbar with stringResult:true or dialog search) the import fail with this error (from firefox console):<br /><br /><p><input type='button' class='sfcodeselect' name='sfselectit6586' value='Select Code' data-codeid='sfcode6586' /></p><div class='sfcode' id='sfcode6586'>Data e ora: 18/07/2012 14.02.58<br />Errore: invalid property id<br />File sorgente: <a rel=&#34;nofollow&#34; href=&#34;https://blahblahblah/lib_js/jquery.jqGrid.min.js&#34; target="_blank">https://blahblahblah/lib_js/jquery.jqGrid.min.js</a><br />Riga: 30, Colonna: 372<br />Codice sorgente:<br />}, &#34;beforeRequest&#34;:null, &#34;beforeProcessing&#34;:null, &#34;onHeaderClick&#34;:null, &#34;viewrecords&#34;:true, &#34;loadonce&#34;:false, &#34;multiselect&#34;:false, &#34;multikey&#34;:false, &#34;editurl&#34;:null, &#34;search&#34;:true, &#34;caption&#34;:&#34;Ricerca estesa consegne&#34;, &#34;hidegrid&#34;:true, &#34;hiddengrid&#34;:false, &#34;postData&#34;:{ &#34;_search&#34;:true, &#34;nd&#34;:1342612973670, &#34;rows&#34;:20, &#34;page&#34;:1, &#34;sidx&#34;:&#34;delivery_id&#34;, &#34;sord&#34;:&#34;desc&#34;, &#34;filters&#34;:{&#34;groupOp&#34;:&#34;AND&#34;,&#34;rules&#34;:[{&#34;field&#34;:&#34;delivery_id&#34;,&#34;op&#34;:&#34;eq&#34;,&#34;data&#34;:&#34;121&#34;}]}, &#34;searchField&#34;:&#34;&#34;, &#34;searchString&#34;:&#34;&#34;, &#34;searchOper&#34;:&#34;&#34; }, &#34;userData&#34;:{ &#34;success&#34;:true, &#34;session_timeout&#34;:false, &#34;message&#34;:&#34;&#34; }, &#34;treeGrid&#34;:false, &#34;treeGridModel&#34;:&#34;nested&#34;, &#34;treeReader&#34;:{}, &#34;treeANode&#34;:-1, &#34;ExpandColumn&#34;:null, &#34;tree_root_level&#34;:0, &#34;prmNames&#34;:{ &#34;page&#34;:&#34;page&#34;, &#34;rows&#34;:&#34;rows&#34;, &#34;sort&#34;:&#34;sidx&#34;, &#34;order&#34;:&#34;sord&#34;, &#34;search&#34;:&#34;_search&#34;, &#34;nd&#34;:&#34;nd&#34;, &#34;id&#34;:&#34;id&#34;, &#34;oper&#34;:&#34;oper&#34;, &#34;editoper&#34;:&#34;edit&#34;, &#34;addoper&#34;:&#34;add&#34;, &#34;deloper&#34;:&#34;del&#34;, &#34;subgridid&#34;:&#34;id&#34;, &#34;npage&#34;:null, &#34;totalrows&#34;:&#34;totalrows&#34; }, &#34;forceFit&#34;:false, &#34;gridstate&#34;:&#34;visible&#34;, &#34;cellEdit&#34;:false, &#34;cellsubmit&#34;:&#34;remote&#34;, &#34;nv&#34;:0, &#34;loadui&#34;:&#34;enable&#34;, &#34;toolbar&#34;:[ false, &#34;&#34; ], &#34;scroll&#34;:false, &#34;multiboxonly&#34;:false, &#34;deselectAfterSort&#34;:true, &#34;scrollrows&#34;:false, &#34;autowidth&#34;:true, &#34;scrollOffset&#34;:18, &#34;cellLayout&#34;:5, &#34;subGridWidth&#34;:20, &#34;multiselectWidth&#34;:20, &#34;gridview&#34;:false, &#34;rownumWidth&#34;:25, &#34;rownumbers&#34;:false, &#34;pagerpos&#34;:&#34;center&#34;, &#34;recordpos&#34;:&#34;right&#34;, &#34;footerrow&#34;:false, &#34;userDataOnFooter&#34;:false, &#34;hoverrows&#34;:true, &#34;altclass&#34;:&#34;ui-priority-secondary&#34;, &#34;viewsortcols&#34;:[ false, &#34;vertical&#34;, true ], &#34;resizeclass&#34;:&#34;&#34;, &#34;autoencode&#34;:false, &#34;remapColumns&#34;:[], &#34;ajaxGridOptions&#34;:{}, &#34;direction&#34;:&#34;ltr&#34;, &#34;toppager&#34;:false, &#34;headertitles&#34;:false, &#34;scrollTimeout&#34;:40, &#34;data&#34;:[], &#34;_index&#34;:{}, &#34;grouping&#34;:false, &#34;groupingView&#34;:{ &#34;groupField&#34;:[], &#34;groupOrder&#34;:[], &#34;groupText&#34;:[], &#34;groupColumnShow&#34;:[], &#34;groupSummary&#34;:[], &#34;showSummaryOnHide&#34;:false, &#34;sortitems&#34;:[], &#34;sortnames&#34;:[], &#34;summary&#34;:[], &#34;summaryval&#34;:[], &#34;plusicon&#34;:&#34;ui-icon-circlesmall-plus&#34;, &#34;minusicon&#34;:&#34;ui-icon-circlesmall-minus&#34; }, &#34;ignoreCase&#34;:true, &#34;cmTemplate&#34;:{}, &#34;idPrefix&#34;:&#34;&#34;, &#34;recordtext&#34;:&#34;Visualizzati {0} - {1} di {2}&#34;, &#34;emptyrecords&#34;:&#34;Nessun record da visualizzare&#34;, &#34;loadtext&#34;:&#34;Caricamento...&#34;, &#34;pgtext&#34;:&#34;Pagina {0} di {1}&#34;, &#34;sortable&#34;:true, &#34;useProp&#34;:true, &#34;id&#34;:&#34;find&#34;, &#34;keyIndex&#34;:false, &#34;localReader&#34;:{ &#34;root&#34;:&#34;rows&#34;, &#34;page&#34;:&#34;page&#34;, &#34;total&#34;:&#34;total&#34;, &#34;records&#34;:&#34;records&#34;, &#34;repeatitems&#34;:false, &#34;cell&#34;:&#34;cell&#34;, &#34;id&#34;:&#34;id&#34;, &#34;userdata&#34;:&#34;userdata&#34;, &#34;subgrid&#34;:{ &#34;root&#34;:&#34;rows&#34;, &#34;repeatitems&#34;:true, &#34;cell&#34;:&#34;cell&#34; } }, &#34;width&#34;:1648, &#34;tblwidth&#34;:1648, &#34;disableClick&#34;:false, &#34;_nvtd&#34;:[ 686, 20 ], &#34;totaltime&#34;:54, &#34;knv&#34;:null }})</div><br /><br /></pre>
<pre>Otherwise everything work as expected.<br /></pre>
<p>Notice that jsonstring data are exported and imported without any intervent.<br />Maybe a bug???</p>
<p>I use jqGrid 4.4.0 and jQuery 1.7.2 and jQuery UI 1.8.21.<br />For every test i&#39;m here and thanky to all for all.<br />Mirko</p>
]]></description>
        	        	<pubDate>Wed, 18 Jul 2012 15:00:59 +0300</pubDate>
        </item>
</channel>
</rss>