<?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: sortable columns</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns</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/sortable-columns/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>zishan on sortable columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p22771</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p22771</guid>
        	        	<description><![CDATA[<p>You can capture column changes via the sortable parameter as described, but please note that the array passed to your callback will be relative to the current column order.&#160; In other words, saving the array as is after moving multiple columns will not produce the desired results.&#160; See my answer on <a title="stack overflow" href="http://stackoverflow.com/questions/1762608/jqgrid-is-there-an-event-for-when-columns-are-reordered/5641155#5641155" target="_blank">stack overflow.</a></p>
]]></description>
        	        	<pubDate>Wed, 13 Apr 2011 21:31:45 +0300</pubDate>
        </item>
        <item>
        	<title>tony on sortable columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p13644</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p13644</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Maybe if you reored the call you will have the neded result i.e. cal getGridParam before remapColumns.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 07 Jan 2010 19:15:52 +0200</pubDate>
        </item>
        <item>
        	<title>riverguardian on sortable columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p13642</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p13642</guid>
        	        	<description><![CDATA[<p>I&#39;m trying to do a remap columns with this:</p>
</p>
<p>sortable: {</p>
<p>&#160;&#160; &#160; &#160; &#160;update: function(perm) {</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;if (perm) { &#160;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;$("#grid").jqGrid("remapColumns", perm, true);</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;var colModels = $("#grid").getGridParam("colModel");</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;}</p>
<p>&#160;&#160; &#160; &#160; &#160;}</p>
<p>&#160;&#160; &#160;}</p>
</p>
<p>but I keep on getting the same column order. Why is this?</p></p>
]]></description>
        	        	<pubDate>Thu, 07 Jan 2010 18:01:23 +0200</pubDate>
        </item>
        <item>
        	<title>csitol on sortable columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12834</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12834</guid>
        	        	<description><![CDATA[<p>Mark, Tony:</p>
<p>Thank you very much!&#160; That&#39;s exactly what I wanted.</p>
<p>PhilM</p>
]]></description>
        	        	<pubDate>Tue, 08 Dec 2009 18:48:57 +0200</pubDate>
        </item>
        <item>
        	<title>markw65 on sortable columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12833</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12833</guid>
        	        	<description><![CDATA[<p>There are a couple of ways to hook into the sortable columns feature. First, rather than just setting the sortable option to true, you need to set it to an object with your options:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5055' value='Select Code' data-codeid='sfcode5055' /></p>
<div class='sfcode' id='sfcode5055'>
<p>$("#mygrid").jqGrid({</p>
<p>...</p>
<p>&#160;sortable : { options : { &#60;whatever sortable options you want&#62; },</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160;update : function(perumtation) {},</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;},</p>
<p>...</p>
<p>};</p>
</div>
<p>The "options" object (if provided) lets you override any of the usual sortable options (see documentation at jquery-ui website). The "update" function (if provided) gets called right after the columns are re-ordered, and gets passed the permutation that was used (the colModel has already been updated, and reflects the new order - the permutation just lets you know exactly what was done).</p>
</p>
<p>As a simplification, if all you want is to catch the update event, you can just do</p>
<p><input type='button' class='sfcodeselect' name='sfselectit108' value='Select Code' data-codeid='sfcode108' /></p>
<div class='sfcode' id='sfcode108'>&#160;&#160; &#160;sortable : function(permutation) { &#60;whatever&#62; },</div>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Tue, 08 Dec 2009 18:46:59 +0200</pubDate>
        </item>
        <item>
        	<title>tony on sortable columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12832</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12832</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Look at sortableColumns method in grid.jqueryui.js</p>
<p>You can add your own options via sortable.options options in the grid. Here you can define all available optins for sortable UI widget - if I understand right</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 08 Dec 2009 18:38:26 +0200</pubDate>
        </item>
        <item>
        	<title>csitol on sortable columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12823</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12823</guid>
        	        	<description><![CDATA[<p>Tony,</p>
<p>Thanks for the quick response.&#160; I&#39;m afraid I wasn&#39;t very clear in my original question.</p>
<p>I was aware of the remapColumns method.&#160; However, what I was looking for was more of an event that would fire when the user moved a column using the drag and drop method.&#160; I wanted to either set a flag in my program so that I would know I need to save the new column order or enable a button to alert the user that they needed to save the new order.</p>
<p>I&#39;ve looked at the remapColumns method again and it appears to just reorder the columns.&#160; Is there more to it than that?</p>
<p>Thanks!</p>
<p>PhilM</p>
]]></description>
        	        	<pubDate>Tue, 08 Dec 2009 18:07:58 +0200</pubDate>
        </item>
        <item>
        	<title>tony on sortable columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12820</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12820</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Yes you can use remapColumns parameter - you can get it via getGridParam method.</p>
<p>The index is the original position the value is the new one.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 08 Dec 2009 18:00:46 +0200</pubDate>
        </item>
        <item>
        	<title>csitol on sortable columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12795</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sortable-columns#p12795</guid>
        	        	<description><![CDATA[<p>Tony,</p>
<p>Is there any way to know if a column has been moved using the sortable option?</p>
<p>Thanks!</p>
<p>Phil M</p>
<p>UPDATE:</p>
<p>I did get this to work using the following code:</p>
<p><em>jQuery(&#39;#gview_gridId&#39;).bind(&#39;sortstop&#39;, function(event, ui) {alert(&#39;here&#39;);});</em></p>
<p>If you have a better way I&#39;m certainly open to it!</p>
<p>Thanks!</p>
]]></description>
        	        	<pubDate>Mon, 07 Dec 2009 16:26:07 +0200</pubDate>
        </item>
</channel>
</rss>