<?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: Disable groupfield sort</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/disable-groupfield-sort</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/feature-request/disable-groupfield-sort/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>betolj on Disable groupfield sort</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/disable-groupfield-sort#p26411</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/disable-groupfield-sort#p26411</guid>
        	        	<description><![CDATA[<p>First, i&#39;d like to say that this is a great project - congratulations!</p>
<p>My English is not very good, but I&#39;ll try.<br />So, I&#39;m working on a firewall solution and would like to share the experience with jqgrid. I get the data remotely in json format, but i manage the information only in memory (client side). For this reason I needed to use the "loadonce" and use clientArray in editUrl. And I save everything (with ajax) in the end (save button).</p>
<p>The difficulty was that i get the data sorted by the server. But, to update "grouping" a need a "reloadGrid" after insert, edit, clone or delete operations.&#160; I can not sort by "groupField" but by "id" (rowid).&#160; I tried various settings to disable sorting on the client side.</p>
<p>So I made a change in jqgrid.</p>
<p>---- my jqGrid def</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; groupingView : {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; groupField : [&#39;inPol&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; groupColumnShow : [false],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; groupCollapse : false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; groupDataSorted : false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; groupSorted: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; groupText : [&#39;&#60;b&#62;{0}&#60;/b&#62;&#160; {1}&#39;]</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; },</p>
<p>----</p>
<p>The new option is "groupSorted".<br />I can disable grouping client sort in this way.</p>
<p>The change in jquery.jqGrid.min.js was very simple...</p>
<p>...if(a.p.grouping){<strong>if(u.groupSorted===true){</strong>r.orderBy(C,u.groupOrder[0],p[0].stype,p[0].srcfmt)<strong>}</strong>;u.groupDataSorted=true}...<br />...k=d.groupCollapse?d.plusicon:d.minusicon,l,r,m;if(!d.groupDataSorted<strong> &#38;&#38; d.groupSorted===true</strong>){d.sortitems[0].sort();...</p>
<p>I saw that other people have also had the same problem.<br /> How the change is minimal, I would propose this as a patch for future versions. So no need to change manually when upgrading too.</p>
<p>Thanks</p></p>
]]></description>
        	        	<pubDate>Thu, 19 Apr 2012 01:39:04 +0300</pubDate>
        </item>
</channel>
</rss>