<?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: save grid parameters and set them at each grid loading</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/save-grid-parameters-and-set-them-at-each-grid-loading</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/help/save-grid-parameters-and-set-them-at-each-grid-loading/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>rochiel on save grid parameters and set them at each grid loading</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/save-grid-parameters-and-set-them-at-each-grid-loading#p23452</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/save-grid-parameters-and-set-them-at-each-grid-loading#p23452</guid>
        	        	<description><![CDATA[<p>I tried beforeRequest with boolean tag (firstLoad).</p>
<p>if it&#39;s the first load, it call function described in next thread without reload grid.</p>
<p>The problem is no parameters has been setted in that case :s</p>
</p>
<p>Any suggestion ? ^^</p>
]]></description>
        	        	<pubDate>Fri, 03 Jun 2011 16:12:37 +0300</pubDate>
        </item>
        <item>
        	<title>rochiel on save grid parameters and set them at each grid loading</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/save-grid-parameters-and-set-them-at-each-grid-loading#p23444</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/save-grid-parameters-and-set-them-at-each-grid-loading#p23444</guid>
        	        	<description><![CDATA[<p>Hello all,</p>
</p>
<p>I&#39;ve saved and set any parameters as :</p>
<p>&#160;- rows, page, sortname and order</p>
<p>&#160;- grid toolbar filters</p>
<p>I can set them but not after grid construction because grid is loading with their own default parameters.</p>
<p>I can set them thank to a button who call this function :</p>
<blockquote>
<p>var gridprefs = prefs.load();<br />&#160;&#160; &#160;var grid = jQuery("#conditioning_factor_table");<br />&#160;&#160; &#160;if(gridprefs["params"] != undefined){&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;for(var i in gridprefs[&#39;params&#39;]){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(i == &#39;sortname&#39;){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;grid.jqGrid(&#39;setGridParam&#39;, {&#39;sortname&#39;: gridprefs[&#39;params&#39;][i]});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}else if(i == &#39;sord&#39;){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;grid.jqGrid(&#39;setGridParam&#39;, {&#39;sortorder&#39;: gridprefs[&#39;params&#39;][i]});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}else if(i == &#39;rows&#39;){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;grid.jqGrid(&#39;setGridParam&#39;, {&#39;rowNum&#39;: gridprefs[&#39;params&#39;][i]});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$("#conditioning_factor_table_toppager_center select option[value=&#39;" + gridprefs[&#39;params&#39;][i] + "&#39;]").attr("selected", true);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}else if(i == &#39;page&#39;){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;grid.jqGrid(&#39;setGridParam&#39;, {&#39;page&#39;: gridprefs[&#39;params&#39;][i]});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;}&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;}<br />&#160;&#160; &#160;if(gridprefs["filters"] != undefined){<br />&#160;&#160; &#160;&#160;&#160; &#160;$("[id^=gs_]").each(function(index) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$(this).val(gridprefs[&#39;filters&#39;][$(this).attr(&#39;id&#39;)]);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$(this).change();<br />&#160;&#160; &#160;&#160;&#160; &#160;});&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;}<br />&#160;&#160; &#160;grid.jqGrid(&#39;setGridParam&#39;, {&#39;_search&#39;: true});<br />&#160;&#160; &#160;grid.trigger("reloadGrid");</p>
</p>
</blockquote>
<p>I would like set these parameters at first grid loading. Solutions (?) :</p>
<p>- disable grid loading, set grid parameters and reloadGrid =&#62; How disable grid reload and enable after saved parameters have setted ?</p>
<p>- set these parameters after construction but before grid first loading : there are events who allow that ?</p>
</p>
<p>If anyone have the solution i&#39;ll take it 🙂</p>
</p>
<p>Thank in advance for your help and Thank to Tony for this great Plugin 😀</p>
]]></description>
        	        	<pubDate>Fri, 03 Jun 2011 09:13:48 +0300</pubDate>
        </item>
</channel>
</rss>