<?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: Open a JQuery Tab from a clickable column within jqgrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/open-a-jquery-tab-from-a-clickable-column-within-jqgrid</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/open-a-jquery-tab-from-a-clickable-column-within-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>shivam on Open a JQuery Tab from a clickable column within jqgrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/open-a-jquery-tab-from-a-clickable-column-within-jqgrid#p26980</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/open-a-jquery-tab-from-a-clickable-column-within-jqgrid#p26980</guid>
        	        	<description><![CDATA[<p>Thanks, i was able to resolve this. Yes, i wanted a link within grid column data. On click of this link, second tab should open.</p>
<p>Just in case others have the same requirement, this is how i did it,</p>
<p>&#160;1. Add a custom Link format to the column data which should be a Link so that we add an ID into the anchor</p>
<p>&#160;2. Make use of onCellSelect to handle the cell select event.</p>
<p>&#160; &#160; &#160; 2.1 Check if the cell clicked is the linkable column</p>
<p>&#160; &#160; &#160; 2.2 If so, bind anchor (using ID) to click event and handle it (invoke the second tab)<span style="white-space: pre;"> </span></p>
</p>
<p>&#60;script type="text/javascript"&#62;</p>
<p>// JQGrid</p>
<p>jQuery("#list2").jqGrid({</p>
<p><span style="white-space: pre;"> </span>$(document).ready(function() {</p>
<p><span style="white-space:pre"> </span>.......</p>
</p>
<p><span style="white-space:pre"> </span>colModel: [</p>
<p><span style="white-space:pre"> </span>{name:........}, // Normal Column</p>
<p><span style="white-space:pre"> </span>{name:&#39;object_name&#39;,index:&#39;object_name&#39;, width:205, sorttype:&#39;text&#39;, edittype:&#39;select&#39;, <strong>formatter:linkFmatter</strong>},</p>
<p><span style="white-space:pre"> </span>// Custom link formater to add ID into anchor tag</p>
<p><span style="white-space:pre"> </span>......</p>
<p><span style="white-space:pre"> </span>onCellSelect: function (rowid,iCol,cellcontent,e) {</p>
<p><span style="white-space:pre"> </span>var cm = jQuery("#list2").jqGrid(&#39;getGridParam&#39;,&#39;colModel&#39;);</p>
<p><span style="white-space:pre"> </span>if (cm)	{</p>
<p><span style="white-space:pre"> </span>var colName = cm[iCol].name;</p>
<p><span style="white-space:pre"> </span>if(colName == &#39;object_name&#39;) {</p>
<p><span style="white-space:pre"> </span>var changeTab = function(ev){ &#160;</p>
<p><span style="white-space:pre"> </span>ev.preventDefault();</p>
<p><span style="white-space:pre"> </span>var tabIndex = this.hash.charAt(this.hash.length-1) -1;</p>
<p><span style="white-space:pre"> </span>$tabs.tabs(&#39;select&#39;, tabIndex);</p>
<p><span style="white-space:pre"> </span>return false;</p>
<p><span style="white-space:pre"> </span>}</p>
<p><span style="white-space:pre"> </span>$(&#39;#linkclass&#39;).bind(&#39;click&#39;, changeTab);</p>
<p><span style="white-space:pre"> </span>$(&#39;#linkclass&#39;).click();</p>
<p><span style="white-space:pre"> </span>}</p>
<p><span style="white-space:pre"> </span>}</p>
<p><span style="white-space:pre"> </span>}</p>
<p><span style="white-space: pre;"> </span>...</p>
<p><span style="white-space: pre;"> </span>}</p>
<p>&#60;/script&#62;</p>
</p>
<p>&#60;script type="text/javascript"&#62;</p>
<p><span style="white-space: pre;"> </span>function linkFmatter(cellvalue, options, rowObject) {</p>
<p><span style="white-space: pre;"> </span>return "&#60;a href=&#39;#fragment-2&#39; id=&#39;linkclass&#39;&#62;&#60;B&#62;"+cellvalue+"&#60;/B&#62;&#60;/a&#62;";</p>
<p><span style="white-space: pre;"> </span>}</p>
<p>&#60;/script&#62;</p></p>
]]></description>
        	        	<pubDate>Fri, 20 Jul 2012 09:00:21 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Open a JQuery Tab from a clickable column within jqgrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/open-a-jquery-tab-from-a-clickable-column-within-jqgrid#p26969</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/open-a-jquery-tab-from-a-clickable-column-within-jqgrid#p26969</guid>
        	        	<description><![CDATA[<p>Hello</p>
<p>Please look for the events in jqGrid documentation.</p>
</p>
<p>It is too common when I click on the column -</p>
<p>what you mean with column - column data or column header - that are different things.</p>
</p>
<p>Best Regards</p>
]]></description>
        	        	<pubDate>Wed, 18 Jul 2012 12:22:14 +0300</pubDate>
        </item>
        <item>
        	<title>shivam on Open a JQuery Tab from a clickable column within jqgrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/open-a-jquery-tab-from-a-clickable-column-within-jqgrid#p26965</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/open-a-jquery-tab-from-a-clickable-column-within-jqgrid#p26965</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>In my ui i have 2 tabs, In the fist tab i am disolaying a jqgrid which has one clickable column. On click of this column, i need to open the second tab.&#160;</p>
<p>Appriciate if any one can show me some direction.</p>
]]></description>
        	        	<pubDate>Wed, 18 Jul 2012 09:47:01 +0300</pubDate>
        </item>
</channel>
</rss>