<?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: get column "index name" onCellSelect event after column reorder</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/get-column-index-name-oncellselect-event-after-column-reorder</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/get-column-index-name-oncellselect-event-after-column-reorder/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>.tel on get column "index name" onCellSelect event after column reorder</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/get-column-index-name-oncellselect-event-after-column-reorder#p19013</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/get-column-index-name-oncellselect-event-after-column-reorder#p19013</guid>
        	        	<description><![CDATA[<p>Hi Oleg,</p>
<p>thanks! &#160;(Vielen Dank)</p>
<p>var cm = jQuery("#list1&#8243;).jqGrid("getGridParam", "colModel");<br />var colName = cm[iCol];<br />alert(colName[&#39;index&#39;]);</p>
<p>is exactly&#160;where I was looking for!&#160;</p>
</p>
<p>Thanks again</p>
<p>.tel</p>
]]></description>
        	        	<pubDate>Sat, 07 Aug 2010 11:53:15 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on get column "index name" onCellSelect event after column reorder</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/get-column-index-name-oncellselect-event-after-column-reorder#p19012</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/get-column-index-name-oncellselect-event-after-column-reorder#p19012</guid>
        	        	<description><![CDATA[<p>You can use following code</p>
<p>var cm = jQuery("#list1&#8243;).jqGrid("getGridParam", "colModel");<br /><span style="font-size: 13.8889px;">var colName = cm[iCol];</span></p>
<p>to get the column name <strong>colName</strong>&#160;from the column number <strong>iCol</strong>.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Sat, 07 Aug 2010 10:50:12 +0300</pubDate>
        </item>
        <item>
        	<title>.tel on get column "index name" onCellSelect event after column reorder</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/get-column-index-name-oncellselect-event-after-column-reorder#p19011</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/get-column-index-name-oncellselect-event-after-column-reorder#p19011</guid>
        	        	<description><![CDATA[<p>Hi</p>
<p>&#160;I would like to get the column index &#160;as defined at the colModel. &#160;i.e. &#8220;country&#8221;. &#160;</p>
<p>I got always the column &#8220;index number&#8221; i.e. &#8220;4&#8221; at the &#8220;onCellSelect&#8221; method.</p>
<p>I&#8217;m using column reordering, too. After the columns have been reordered&#160;the column index numbers are changed as well.</p>
<p>In other words the &#8220;country&#8221; column index number has no longer the value &#8220;4&#8221;. And here is my issue :</p>
<p>I try to implement more than one hyperlink at the same row, depending on the cell click.</p>
<p>Therefore I need to know if someone click at the &#8220;country&#8221; cell. With the changed column index numbers I guess I can&#39;t figure&#160;out.</p>
<p>I use the following not perfect workaround &#160;:</p>
<p>&#160;onCellSelect: function(id,cellidx,cellvalue) {&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</p>
<p>&#160;&#160;&#160;&#160;&#160; var&#160; row= jQuery("#list1").jqGrid(&#39;getRowData&#39;,id);</p>
<p>&#160;&#160;&#160;&#160; if(cellvalue== row.country){</p>
<p>&#160;&#160; // ajax call URL 1</p>
<p>&#160;&#160;&#160; }&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</p>
<p>&#160;&#160; else</p>
<p>&#160;&#160; if(cellvalue== row.name){</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // ajax call URL 2</p>
<p>&#160;&#160; }</p>
<p>&#160;else</p>
<p>&#160;&#160; return false;</p>
<p>&#8230;</p>
<p>}</p>
</p>
<p>BTW:</p>
<p>colNames: [&#39;ID&#39;,&#39;Name&#39;, &#39;Last Login&#39;, &#39;Country&#39;,&#39;Active&#39;,&#39;Time Zone&#39;,&#39;Local Format&#39;,&#39;First&#39;,&#39;Last&#39;,&#39;Email&#39;],</p>
<p>colModel : [</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;id&#39;, index : &#39;id&#39;, width : 40,&#160; sorttype : &#39;int&#39;, align: &#39;center&#39;},</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;name&#39;, index : &#39;name&#39;, width : 80, sorttype : &#39;text&#39;, align: &#39;left&#39;},</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;lastlogin&#39;, index : &#39;lastlogin&#39;, width : 80, sorttype : &#39;date&#39;, align: &#39;left&#39;,hidedlg :&#39;true&#39;},</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;country&#39;, index : &#39;country&#39;, width : 80,&#160; align: &#39;left&#39;},</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;user_active&#39;, index : &#39;user_active&#39;, width : 80,&#160; align: &#39;right&#39;},</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;timezone&#39;, index : &#39;timezone&#39;, width : 80,&#160; align: &#39;right&#39;},</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;number_format&#39;, index : &#39;number_format&#39;, width : 80,&#160; align: &#39;right&#39;},</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;firstname&#39;, index : &#39;firstname&#39;, width : 80,&#160; align: &#39;right&#39;},</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;lastname&#39;, index : &#39;lastname&#39;, width : 80, align: &#39;right&#39;},</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name : &#39;email&#39;, index : &#39;email&#39;, width : 80,&#160; align: &#39;right&#39; }</p>
<p>&#160;&#160;&#160; ],</p>
</p>
<p>Any ideas how I can get the column index name instead of the column index number?</p>
<p>Thanks!</p>
]]></description>
        	        	<pubDate>Sat, 07 Aug 2010 02:32:35 +0300</pubDate>
        </item>
</channel>
</rss>