<?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: sortableColumns =&#62; update() function fails where there are group headers</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/sortablecolumns-update-function-fails-where-there-are-group-headers</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/sortablecolumns-update-function-fails-where-there-are-group-headers/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on sortableColumns =&#62; update() function fails where there are group headers</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/sortablecolumns-update-function-fails-where-there-are-group-headers#p31078</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/sortablecolumns-update-function-fails-where-there-are-group-headers#p31078</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>Not sure if this will be done in the near future. The logic of thisÂ  is very difficult to be implemented, but not impossible.</p>
<p>Â </p>
<p>Kind Regards</p>
]]></description>
        	        	<pubDate>Mon, 08 Sep 2014 10:49:28 +0300</pubDate>
        </item>
        <item>
        	<title>ilagi on sortableColumns =&#62; update() function fails where there are group headers</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/sortablecolumns-update-function-fails-where-there-are-group-headers#p31033</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/sortablecolumns-update-function-fails-where-there-are-group-headers#p31033</guid>
        	        	<description><![CDATA[<p>Thanks, I'm sorry to hear that.</p>
<p>Any plans to make them compatible in a future release?</p>
]]></description>
        	        	<pubDate>Fri, 29 Aug 2014 14:58:55 +0300</pubDate>
        </item>
        <item>
        	<title>tony on sortableColumns =&#62; update() function fails where there are group headers</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/sortablecolumns-update-function-fails-where-there-are-group-headers#p31026</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/sortablecolumns-update-function-fails-where-there-are-group-headers#p31026</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Sortable columns are not compatible with group header.</p>
<p>Note that this <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:groupingheadar#limitations" target="_blank">is documented</a></p>
<p>REgards</p>
]]></description>
        	        	<pubDate>Fri, 29 Aug 2014 10:52:22 +0300</pubDate>
        </item>
        <item>
        	<title>ilagi on sortableColumns =&#62; update() function fails where there are group headers</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/sortablecolumns-update-function-fails-where-there-are-group-headers#p31016</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/sortablecolumns-update-function-fails-where-there-are-group-headers#p31016</guid>
        	        	<description><![CDATA[<p>If there is a grid with group headers then the sortableColumns =&#62; update() function fails as the group headers are th elements, but they don't have ids.</p>
<p>See the highlighted part where it fails.</p>
<p>Javascript error: Cannot read property 'id' of undefined.</p>
<p>This seems to be happening because the group headers are the th elements, while this code below assumes that each th is a column. Simply adding an if checking for whether the id exist eliminates the error, but then those columns which are grouped together are completely ignored.</p>
<p><span style="text-decoration: underline">jquery.jqGrid.src.js:</span></p>
<p>$.jgrid.extend({<br />
Â  sortableColumns : function (tblrow)<br />
Â  {<br />
Â  ...<br />
Â  "update": function(event, ui) {<br />
Â  Â  Â var p = $(ui.item).parent(),<br />
 Â  Â  Â th = $("&#62;th", p),<br />
 Â  Â  Â colModel = ts.p.colModel,<br />
 Â  Â  Â cmMap = {}, tid= ts.p.id+"_";<br />
 Â  Â  Â $.each(colModel, function(i) { cmMap[this.name]=i; });<br />
 Â  Â  Â var permutation = [];<br />
 Â  Â  Â th.each(function() {<br />
 Â  Â  Â Â  Â  Â <strong>var id = $("&#62;div", this).get(0).id.replace(/^jqgh_/, "").replace(tid,""</strong>);<br />
 Â  Â  Â Â  Â  Â if (cmMap.hasOwnProperty(id)) {<br />
 Â  Â  Â Â  Â  Â Â  Â  Â permutation.push(cmMap[id]);<br />
 Â  Â  Â Â  Â  Â }<br />
 Â  Â  Â }); </p>
<p> Â  Â  Â $(ts).jqGrid("remapColumns",permutation, true, true);<br />
 Â  Â  Â if ($.isFunction(ts.p.sortable.update)) {<br />
 Â  Â  Â Â  Â  Â ts.p.sortable.update(permutation);<br />
 Â  Â  Â }<br />
 Â  Â  Â setTimeout(function(){ts.p.disableClick=false;}, 50);<br />
Â  }</p>
<p>....</p>
]]></description>
        	        	<pubDate>Wed, 27 Aug 2014 23:51:13 +0300</pubDate>
        </item>
</channel>
</rss>