<?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: jqgrid drag and drop headings for grouping</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping</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/jqgrid-drag-and-drop-headings-for-grouping/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on jqgrid drag and drop headings for grouping</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30954</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30954</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>Wow - it is good. Thanks for sharing this solution.</p>
<p>Â </p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 18 Aug 2014 10:54:52 +0300</pubDate>
        </item>
        <item>
        	<title>rize on jqgrid drag and drop headings for grouping</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30906</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30906</guid>
        	        	<description><![CDATA[<p>Hi ,</p>
<p>I posted a similar Question on a different form and was pointed to a updated drag and drop heading source.</p>
<p>This seems to solve my problems..</p>
<p>Â </p>
<p><a href="http://jsfiddle.net/vRtKS/95/" target="_blank">Drag/Drop Grouping</a></p>
<p>Â </p>
<p>Thanks for the help.</p>
<p>Ryan</p>
]]></description>
        	        	<pubDate>Tue, 29 Jul 2014 17:38:28 +0300</pubDate>
        </item>
        <item>
        	<title>rize on jqgrid drag and drop headings for grouping</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30902</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30902</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>Thanks for the response.</p>
<p>I was hoping someone else hadÂ this problem before and it had been solved already.</p>
<p>here is my JS function to setup drag and drop headings.</p>
<p>It works very well except for my heading name problem.Â </p>
<p>Please see the comments in the code for the problem I am facing.</p>
<p>Thanks again for the help.</p>
<p>Ryan</p>
<p>Â </p>
<p>function SetupDragAndDropHeader() {<br />
 $('tr.ui-jqgrid-labels th div').draggable({<br />
 appendTo: 'body',<br />
 helper: 'clone'<br />
 });</p>
<p>$('#groups ol').droppable({<br />
 activeClass: 'ui-state-default',<br />
 hoverClass: 'ui-state-hover',<br />
 accept: ':not(.ui-sortable-helper)',</p>
<p>drop: function (event, ui) {<br />
 var $this = $(this);<br />
 $this.find('.placeholder').remove();</p>
<p>var groupingColumn = $('&#60;li &#62;&#60;/li&#62;').attr('data-column', ui.draggable.attr('id').replace('jqgh_' + gridId + '_', ''));</p>
<p>$('&#60;span class="ui-icon ui-icon-close"&#62;&#60;/span&#62;').click(function () {<br />
 $(this).parent().remove();<br />
 $('#' + gridId).jqGrid('groupingRemove');<br />
 $('#' + gridId).jqGrid('groupingGroupBy', getheader());</p>
<p><strong>// !!!!!!!!!!!!!!!! tried adding here</strong><br />
 <strong> // setGroupHeaderText();</strong></p>
<p>if ($('#groups ol li:not(.placeholder)').length === 0) {<br />
 $('&#60;li class="placeholder"&#62;Drag a column header and drop it here to group by that column&#60;/li&#62;').appendTo($this);<br />
 }<br />
 }).appendTo(groupingColumn);</p>
<p>Â </p>
<p>groupingColumn.append(ui.draggable.text());<br />
 groupingColumn.appendTo($this);</p>
<p>$('#' + gridId).jqGrid('groupingRemove');<br />
 $('#' + gridId).jqGrid('groupingGroupBy', getheader());</p>
<p><strong>// !!!!!!!!!!!!!!!! Â tried adding here</strong></p>
<p><strong>//This almost works but it sets the first group Name only when you drag and drop a second group. </strong><br />
 <strong> // the second group then has no group heading name but data as the group name group ie {0}</strong><br />
 <strong> // adding a third group adds names for the first and second group but the third group has data </strong></p>
<p><strong>//as the group name group ie {0}</strong></p>
<p><strong> setGroupHeaderText();</strong></p>
<p>}</p>
<p>}).sortable({<br />
 items: 'li:not(.placeholder)',<br />
 sort: function () {<br />
 $(this).removeClass('ui-state-default');<br />
 },</p>
<p>stop: function () {<br />
 $('#' + gridId).jqGrid('groupingRemove');<br />
 $('#' + gridId).jqGrid('groupingGroupBy', getheader());</p>
<p><strong>// !!!!!!!!!!!!!!!! tried adding here</strong><br />
 <strong> // setGroupHeaderText();</strong></p>
<p>}<br />
 });<br />
 }</p>
<p>function getheader()<br />
 {<br />
 var header = $('#groups ol li:not(.placeholder)').map(function () { return $(this).attr('data-column'); }).get();<br />
 return header;<br />
 }</p>
<p>function setGroupHeaderText()<br />
 {<br />
 $('#' + gridId).jqGrid('setGridParam',<br />
 {<br />
 groupingView:<br />
 {<br />
 groupText: getheader(),</p>
<p><strong>// Future Problem</strong></p>
<p><strong>// groupText: [getheader() + ' : {0} '],</strong><br />
 <strong> // on second column drag/drop it adds add heading to first group but it puts the namesÂ </strong><strong>as </strong></p>
<p><strong>//" Name,Price : John"</strong></p>
<p><strong>// adding a third group changes the first heading to Name,Price,Location : John. The Second and third //group only has data as the group name i.e {0}</strong></p>
<p>groupSummaryPos: ['footer'],<br />
 groupCollapse: true,<br />
 ShowGroupColumn: true<br />
 }<br />
 });<br />
 }</p>
]]></description>
        	        	<pubDate>Tue, 29 Jul 2014 13:14:53 +0300</pubDate>
        </item>
        <item>
        	<title>tony on jqgrid drag and drop headings for grouping</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30896</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30896</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>This is a very interesting job.</p>
<p>You can use groupText property in grouping - seeÂ <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:grouping#options_and_methods" target="_blank">docs</a> and demos.</p>
<p>Â </p>
<p>If you have difficulties to realise this, please let me know I will try to help you.</p>
<p>Â </p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 28 Jul 2014 20:43:44 +0300</pubDate>
        </item>
        <item>
        	<title>rize on jqgrid drag and drop headings for grouping</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30882</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-drag-and-drop-headings-for-grouping#p30882</guid>
        	        	<description><![CDATA[<p>Hi all,</p>
<p>I have setup drag and drop headings to group by the relevant column Â fromÂ <a href="http://jsfiddle.net/tpeczek/vRtKS/" target="_blank">http://jsfiddle.net/tpeczek/vRtKS/</a></p>
<p>It works great however I am trying to display the column name before the value i.e.</p>
<p>Â </p>
<p>Client : Test</p>
<p>data</p>
<p>data</p>
<p>Â </p>
<p>Client : Test2</p>
<p>data</p>
<p>data</p>
<p>Â </p>
<p>I've been going around in circles for a week now if any one could help.</p>
<p>Â </p>
<p>Kind Regards,</p>
<p>Ryan</p>
]]></description>
        	        	<pubDate>Wed, 23 Jul 2014 17:37:01 +0300</pubDate>
        </item>
</channel>
</rss>