<?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: Where to sdd a click function for a href link</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link</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/where-to-sdd-a-click-function-for-a-href-link/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>swhit on Where to sdd a click function for a href link</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p7098</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p7098</guid>
        	        	<description><![CDATA[<p>A better way to do this might be to create this link on the PHP (server side) so it offloads the work onto the server and the info is already there for the jqgrid. Here is an example for an XML data return (please note the &#8220;htmlentities&#8221; in the php code):</p>
<p>foreach ($result as $key =&#62; $value) {</p>
<p><span> </span>$html .= &#8220;&#60;row id=&#39;&#8221;. $value[&#39;id&#39;].&#8221;&#39;&#62;&#8221;; &#160; &#160; &#160; &#160; &#160; &#160;</p>
<p>$link = &#8220;&#60;a href=&#39;#&#39; onclick=&#39;some_function(\\&#8221;" . $value[&#39;id&#39;] . &#8220;\\&#8221;);&#39;&#62;Here is a Link&#60;/a&#62;&#8221;;</p>
<p><span> </span>$html .= &#8220;&#60;cell&#62;&#8221; . htmlentities($link) . &#8220;&#60;/cell&#62;&#8221;;</p>
<p>$html .= &#8220;&#60;/row&#62;&#8221;;</p>
<p><span> </span>}</p>
<p>return $html;</p></p>
]]></description>
        	        	<pubDate>Sun, 07 Jun 2009 12:51:30 +0300</pubDate>
        </item>
        <item>
        	<title>binchen on Where to sdd a click function for a href link</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p6114</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p6114</guid>
        	        	<description><![CDATA[<p>I know why it is so slow now.</p>
<p>When you add after setCell in afterInsertRow for 250 rows, It actually attached click function 250 times for the first row (We can do math for other row).</p>
<p>The correct place is in "gridComplete: function() { }"</p>
<p>Thanks again, your suggestion still led to solve my problem.</p>
]]></description>
        	        	<pubDate>Thu, 16 Apr 2009 10:14:57 +0300</pubDate>
        </item>
        <item>
        	<title>binchen on Where to sdd a click function for a href link</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p6112</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p6112</guid>
        	        	<description><![CDATA[<p>Thanks,</p>
<p>It works, however it will add to each and very single row. When my requirement needs to display 250 rows, it just a way too slow when my click function needs to retrieve data from Database.</p>
<p>Any way I can add the click function for &#60;a href&#62; to the whole grid then pass on to each cells? May be an enhencement for consideration?</p>
<p>Thanks again.</p></p>
]]></description>
        	        	<pubDate>Thu, 16 Apr 2009 09:49:30 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Where to sdd a click function for a href link</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p6081</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p6081</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You can add click in afterInsertRow too. Just after setCell add this and it will work.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 16 Apr 2009 03:41:00 +0300</pubDate>
        </item>
        <item>
        	<title>binchen on Where to sdd a click function for a href link</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p6051</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/where-to-sdd-a-click-function-for-a-href-link#p6051</guid>
        	        	<description><![CDATA[</p>
<p>I added &#60;a href&#62; to my cells in afterInsertRow as:<span style="font-size: x-small;">jQuery(</span></p>
<p><span style="font-size: x-small; color: #a31515;">"#gridReferralConsultList"</span><span style="font-size: x-small;">).setCell(rowid, </span><span style="font-size: x-small; color: #a31515;">"HCPRequesting"</span><span style="font-size: x-small;">, </span><span style="font-size: x-small; color: #a31515;">"&#60;a href=&#39;#dialog</span><span style="font-size: x-small; color: #a31515;">&#39; name=&#39;modal&#39;&#62;"</span><span style="font-size: x-small;"> + aData.HCPRequesting + </span><span style="font-size: x-small; color: #a31515;">"&#60;/a&#62;"</span><span style="font-size: x-small;">);</span></p>
<p>I would like to know&#160;how&#160;can I add click function like the following,</p>
<p>My code and click function works if the &#60;a href&#62; link is outside jqGrid.</p>
<p><span style="font-size: x-small;">$(&#39;a[name=model]&#39;).click(function(e) {</span></p>
<p><span style="font-size: x-small;">e.preventDefault();</span></p>
<p><span style="font-size: x-small;">...</span></p>
<p><span style="font-size: x-small;">})</span></p>
<p><font size="2"></p>
<p></font></p>
]]></description>
        	        	<pubDate>Wed, 15 Apr 2009 18:08:06 +0300</pubDate>
        </item>
</channel>
</rss>