<?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: Cant sortGrid With Multiple Columns When multiSort=true</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue</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/cant-sortgrid-with-multiple-columns-when-multisorttrue/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tprebs on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30744</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30744</guid>
        	        	<description><![CDATA[<p>Is there a work around for the right to left sorting issue?Â </p>
<p>My current project is dependent on this before go live.Â </p>
]]></description>
        	        	<pubDate>Mon, 09 Jun 2014 17:36:33 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30729</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30729</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You can use diffrent editors - just go in your proffil and select BBcode editor if you have problem with this.<br />
Also you can use GitHub to post changes.<br />
Thank you.</p>
<p>Kind Regards</p>
]]></description>
        	        	<pubDate>Fri, 06 Jun 2014 12:11:22 +0300</pubDate>
        </item>
        <item>
        	<title>av21 on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30717</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30717</guid>
        	        	<description><![CDATA[<p>I have fix to this problem after modification of some part of the jquery.jqgrid.js file.</p>
<p>i am trying to post the code here somehow getting error. is there way i can attach js file here?</p>
]]></description>
        	        	<pubDate>Mon, 02 Jun 2014 21:38:47 +0300</pubDate>
        </item>
        <item>
        	<title>av21 on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30715</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30715</guid>
        	        	<description><![CDATA[<p>hey tony thanks for reply. but does it means we can not do reverse multisort with current version? if so is there any workaround for now?Â </p>
]]></description>
        	        	<pubDate>Mon, 02 Jun 2014 17:38:42 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30714</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30714</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>This will be updated and additionally to that there will be a possibility to define the multisort in way the user click on the column - i.e we will not count it from left to right.</p>
<p>Kind Regards</p>
]]></description>
        	        	<pubDate>Mon, 02 Jun 2014 17:19:23 +0300</pubDate>
        </item>
        <item>
        	<title>av21 on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30708</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30708</guid>
        	        	<description><![CDATA[<p>Hi Tony, Even i am facing same problem just like steve. jqgrid always gives precedence to left most column for multisort.i was looking in detail at jquery.jqgrid.js for multi sort and what i felt that it always look at in colmodel sequence to append sort name . line 2239</p>
<p>ts.p.sortorder = "";<br />
Â Â  Â Â Â  Â Â Â  Â $.each(cm, function(i){<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â if(this.lso) {<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â if(i&#62;0 &#38;&#38; fs) {<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â sort += ", ";<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â }<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â splas = this.lso.split("-");<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â sort += cm[i].index &#124;&#124; cm[i].name;<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â sort += " "+splas[splas.length-1];<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â fs = true;<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â ts.p.sortorder = splas[splas.length-1];<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â }<br />
Â Â  Â Â Â  Â Â Â  Â });<br />
Â Â  Â Â Â  Â Â Â  Â ls = sort.lastIndexOf(ts.p.sortorder);<br />
Â Â  Â Â Â  Â Â Â  Â sort = sort.substring(0, ls);<br />
Â Â  Â Â Â  Â Â Â  Â ts.p.sortname = sort;</p>
<p><strong>ts.p.sortname = sort; - this is always will be Left columm asc/desc, Right column asc/desc</strong></p>
<p>No matter if you have sort order with Field2(right col), Field1(left col).</p>
<p>Â </p>
<p>I also tried to change <strong>ts.p.sortname</strong> to proper sequence based on header click, though data is not sorting the way we click header. it always sorts left column and then right column.</p>
<p>Am i missing something here? trying to fix that issue but no luck. do you have any updates?</p>
]]></description>
        	        	<pubDate>Fri, 30 May 2014 22:07:09 +0300</pubDate>
        </item>
        <item>
        	<title>Steve_Suarez on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30244</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30244</guid>
        	        	<description><![CDATA[<p>Hi Tony, I was able to implement my requirement by using &#39;GridUnload&#39; for destroying the previous sorting cirteria and order. But I have run into another problem. It seems, at least to me, that jqgrid always gives precedence to the left most column while sorting with multiSort : true.</p>
<p>I mean even if I am executing the following command -</p>
<p><strong>jQuery("#grid").jqGrid(&#39;sortGrid&#39;, "Field1&#8243;, true, "asc").jqGrid(&#39;sortGrid&#39;, "Field2&#8243;, true, "asc");</strong></p>
<p>where I would expect the outcome to be a grid sorted on "Field1" first and then on "Field2", the outcome is this only when "Field1" is on the left of "Field2". Whenever the "Field1" is on the right of "Field2" the actual outcome will be a grid sorted on "Field2" first and then on "Field1".</p>
<p>Kindly tell me, whether my observation is a mistake from my end or is it actually&#160;a part of the&#160;behaviour of jqgrid and if it&#39;s a part of the behaviour of jqgrid, whether a work around exists or not?</p>
<p>Thanks a ton btw <img class="spSmiley" style="margin:0" title="Smile" src="/blog/wp-content/forum-smileys/sf-smile.gif" alt="Smile" /></p>
<p><strong></strong>&#160;</p></p>
]]></description>
        	        	<pubDate>Fri, 14 Feb 2014 15:22:43 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30235</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30235</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>It seems that there is a problem with this. I will try to fix this for the upcomming release (very soon)</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Wed, 12 Feb 2014 12:57:19 +0200</pubDate>
        </item>
        <item>
        	<title>Steve_Suarez on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30232</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30232</guid>
        	        	<description><![CDATA[<p>Hi Tony, Any updates please?</p>
]]></description>
        	        	<pubDate>Wed, 12 Feb 2014 06:59:48 +0200</pubDate>
        </item>
        <item>
        	<title>Steve_Suarez on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30222</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30222</guid>
        	        	<description><![CDATA[<p>Hi Tony, thanks for such a quick reply!</p>
<p>This is how I have am doing it on my jsp -</p>
<p>When the user wants to sort the grid on multiple columns, she has to press a sort button provided on the screen. This will take her to a pop up window where all the columns of the grid by the name are shown.&#160;From these columns, she can select 1, 2 or 3 columns for sorting. An &#39;ok&#39; button on the pop up will take her back to the main page. After this I execute the rest of the method. If she had selected only one field for sorting, I execute the follwing -</p>
<p><strong>jQuery("#grid").jqGrid(&#39;sortGrid&#39;, "Field1&#8243;, true, "asc");</strong></p>
<p>If she had selected 2 fields then I execute the following -</p>
<p><strong>jQuery("#grid").jqGrid(&#39;sortGrid&#39;, "Field1&#8243;, true, "asc").jqGrid(&#39;sortGrid&#39;, "Field2&#8243;, true, "asc");</strong></p>
<p>If she had selected 3 fields then I execute the following -</p>
<p><strong>jQuery("#grid").jqGrid(&#39;sortGrid&#39;, "Field1&#8243;, true, "asc").jqGrid(&#39;sortGrid&#39;, "Field2&#8243;, true, "asc").jqGrid(&#39;sortGrid&#39;, "Field3&#8243;, true, "asc");</strong></p>
<p><strong>&#160;</strong></p>
<p>Now when she does any of these three actions for the very first time, everything is executed correctly, however if she tries to execute the 3rd action, for instance, second time, even though I have explicitley mentioned &#39;asc&#39; as the sort criteria, the grid would sort in descending order and when the same action is done for a 3rd time the grid is restored to it&#39;s first time load state(unsorted state). After this the cycle repeats itself.</p>
<p>Hope this will help you in detecting the root cause of the problem.</p>
<p>Thanks again! <img class="spSmiley" style="margin:0" title="Laugh" src="/blog/wp-content/forum-smileys/sf-laugh.gif" alt="Laugh" /></p>
]]></description>
        	        	<pubDate>Mon, 10 Feb 2014 16:27:41 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30217</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30217</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Should I understand that you execute the above code several times - i.e with asc parameter. How do you call the second and third sorting?</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 10 Feb 2014 14:34:24 +0200</pubDate>
        </item>
        <item>
        	<title>Steve_Suarez on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30215</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p30215</guid>
        	        	<description><![CDATA[<p>Hi guys, I am using the jqgrid multisort for a project. My requirement is to sort&#160;the grid using a minimum of 1 and a&#160;maximum of 3 colums and always in ascending order. At the moment, when I am using the following method,</p>
<p>/*</p>
<p>jQuery("#grid")</p>
<p>.jqGrid(&#39;sortGrid&#39;, "Field1&#8243;, true, "asc")</p>
<p>.jqGrid(&#39;sortGrid&#39;, "Field2&#8243;, true, "asc");</p>
<p>*/</p>
<p>sorting happens correctly for the first time, but on second sort jqgrid automatically gets sort in descending order and on the 3rd sort the original condition (presort state) of jqgrid is restored. Please suggest me some way of fulfilling this requirement.</p>
<p>Thanks and Regards.</p>
]]></description>
        	        	<pubDate>Mon, 10 Feb 2014 11:56:20 +0200</pubDate>
        </item>
        <item>
        	<title>OronMorad on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29214</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29214</guid>
        	        	<description><![CDATA[<blockquote>
<p>OronMorad said:
</p>
<p>Right now to walk around of the grid not minding the sort order i ask, i have to set each ColModel[index].lso to the opposite order.</p>
</p>
</blockquote>
<hr />
<p>Great thanks.</p>
<p>Just making sure you know this is a different issue from the quote above.</p>
]]></description>
        	        	<pubDate>Wed, 24 Jul 2013 12:14:46 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29202</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29202</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Thank you very much. Fixed in GitHub</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 22 Jul 2013 16:41:37 +0300</pubDate>
        </item>
        <item>
        	<title>OronMorad on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29197</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29197</guid>
        	        	<description><![CDATA[<p>Seems to be working, thanks alot!</p>
</p>
<p>Right now to walk around of the grid not minding the sort order i ask, i have to set each ColModel[index].lso to the opposite order.</p>
<p>And also, have to set the&#160;<span style="font-size: 14px;">ColModel.firstsortorder to "desc", due to a bug that the multiSort function does this:</span></p>
<pre>}&#160;else&#160;{
	cm[iCol].lso&#160;=&#160;so&#160;=&#160;cm.firstsortorder&#160;&#124;&#124;&#160;&#39;asc&#39;;
}</pre>
<pre></pre>
<pre>instead of this (i think...)</pre>
<pre></pre>
<pre></pre>
<pre>}&#160;else&#160;{
	cm[iCol].lso&#160;=&#160;so&#160;=&#160;cm<strong>[iCol]</strong>.firstsortorder&#160;&#124;&#124;&#160;&#39;asc&#39;;
}</pre>
<pre></pre>
<pre></pre>
<p>Hope you fix that too,&#160;</p>
</p>
<p>Thanks for the help.</p>
]]></description>
        	        	<pubDate>Sun, 21 Jul 2013 11:43:52 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29175</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29175</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Thanks for this. Will maybe improve sortGrid function.</p>
</p>
<p>Currently in order to achieve this you will need to call sortGrid (in multiSort set to true) several times like this.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2674' value='Select Code' data-codeid='sfcode2674' /></p>
<div class='sfcode' id='sfcode2674'>
<p>jQuery("#grid")</p>
<p>.jqGrid(&#39;sortGrid&#39;, "Field1&#8243;, true, "asc")</p>
<p>.jqGrid(&#39;sortGrid&#39;, "Field2&#8243;, true, "desc");</p>
</div>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 15 Jul 2013 11:47:49 +0300</pubDate>
        </item>
        <item>
        	<title>OronMorad on Cant sortGrid With Multiple Columns When multiSort=true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29124</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cant-sortgrid-with-multiple-columns-when-multisorttrue#p29124</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>great work with the grid so far.</p>
</p>
<p>Although, after upgrading to 4.5.2 and setting multiSort to true, I cant seem to be able to sort the grid with multiple columns by code.</p>
</p>
<p>i.e:&#160;</p>
<p>jQuery("#grid").jqGrid(&#39;setGridParam&#39;, { sortname: "Field1 asc, Field2", sortorder: "asc" }).trigger(&#39;reloadGrid&#39;);</p>
<p>or</p>
<p>jQuery("#grid").jqGrid(&#39;sortGrid&#39;, "Field1 asc, Field2", true, "asc");</p>
<p>or any combination of the two actually.</p>
</p>
<p>Im using local data (by calling &#39;addRowData&#39;)</p>
</p>
<p>Will this be possible in the near future?</p>
<p>Thank you.</p>
</p>
<p>btw: the reloadGrid trigger is not working in this case, and when sorting via the GUI you can only sort by left-&#62;right order of the columns (i.e can sort by field2, field3 and then by field5, but cant field5, field2 and then by field3).<br />Although i saw posts regarding these issues already.</p>
]]></description>
        	        	<pubDate>Tue, 09 Jul 2013 17:27:42 +0300</pubDate>
        </item>
</channel>
</rss>