<?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: fixed after reload the sort can't work well</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/fixed-after-reload-the-sort-cant-work-well</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/fixed-after-reload-the-sort-cant-work-well/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>nanlinfeixue on fixed after reload the sort can't work well</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/fixed-after-reload-the-sort-cant-work-well#p17633</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/fixed-after-reload-the-sort-cant-work-well#p17633</guid>
        	        	<description><![CDATA[<p>Description of the problem  in <a rel="nofollow" href="/blog/?page_id=393/bugs/after-reload-the-sort-cant-work-well/" target="_blank"></a><a href="http://www.trirand.com/blog/?p" rel="nofollow" target="_blank">http://www.trirand.com/blog/?p</a>.....work-well/</p>
<p>I&#39;ve found the problem, the problem is that when the data loadcompleted, i set the datatype:local and sort for a column, then ts.p.lastsort remembered this column.</p>
<p>After i set the datatype:json and reload the grid the ts.p.lastsort is also exist,so it will not re-sort this out but the implementation of the reverse.</p>
<p>So i add code in grid.base.js at line 1514 "ts.p.lastsort = null;", problem solved.</p>
</p>
<p>bind(&#39;reloadGrid&#39;, function(e, opts) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (ts.p.treeGrid === true) { ts.p.datatype = ts.p.treedatatype; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (opts &#38;&#38; opts.current) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ts.grid.selectionPreserver(ts);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (ts.p.datatype == "local") { $(ts).jqGrid("resetSelection"); }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else if (!ts.p.treeGrid) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ts.p.selrow = null;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>&#160; <span style="color: #ff0000;">ts.p.lastsort = null;</span></strong><br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (ts.p.multiselect) { ts.p.selarrrow = []; $(&#39;#cb_&#39; + $.jgrid.jqID(ts.p.id), ts.grid.hDiv).attr("checked", false); }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ts.p.savedRow = [];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (ts.p.scroll) { emptyRows(ts.grid.bDiv, true); }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
]]></description>
        	        	<pubDate>Tue, 01 Jun 2010 11:40:35 +0300</pubDate>
        </item>
</channel>
</rss>