<?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: Help! jqgrid onclick or click only works once</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/help-jqgrid-onclick-or-click-only-works-once</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/help-jqgrid-onclick-or-click-only-works-once/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>crohit on Help! jqgrid onclick or click only works once</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-jqgrid-onclick-or-click-only-works-once#p29029</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-jqgrid-onclick-or-click-only-works-once#p29029</guid>
        	        	<description><![CDATA[<blockquote>
<p>tony said:</p>
<p>Hello,</p>
</p>
<p>Check to see if you have a uniquie id&#39;s in the grid.</p>
</p>
<p>Regards</p>
</blockquote>
<hr />
<p>Yes, I do have unique ids in the grid for my data. If you see my code, you will notice that I have 3 different ways I am trying to circumvent the issue. But, if i DO NOT call jqgrid, then the onclick works every time. Thats where i show an JS Alert in my code.</p>
]]></description>
        	        	<pubDate>Tue, 18 Jun 2013 23:43:31 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Help! jqgrid onclick or click only works once</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-jqgrid-onclick-or-click-only-works-once#p29027</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-jqgrid-onclick-or-click-only-works-once#p29027</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Check to see if you have a uniquie id&#39;s in the grid.</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Tue, 18 Jun 2013 19:29:25 +0300</pubDate>
        </item>
        <item>
        	<title>crohit on Help! jqgrid onclick or click only works once</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-jqgrid-onclick-or-click-only-works-once#p29022</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-jqgrid-onclick-or-click-only-works-once#p29022</guid>
        	        	<description><![CDATA[<p>I am using Master Detail grid. I have a Form, where the user inputs one or more search criteria and clicks a Button. The button calls the JS function, which in turn calls jqgrid master detail logic and shows the grids with the data returned from the server.</p>
<p>The problem is that the Button onclick only works One time. After that I have to do a page reload to make the onclick work again.</p>
<p>I tried calling another simple JS function (non jqgrid) and in that case Onclick works any number of times.</p>
<p>There is something in jqgrid code, that takes away my ability of onclick.</p>
<p>Please let me know if there is a setting or workaround for this.</p>
<p>thanks</p>
<p>Here is the code:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9169' value='Select Code' data-codeid='sfcode9169' /></p>
<div class='sfcode' id='sfcode9169'>
<p>&#60;head&#62;</p>
<p>&#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&#62;</p>
<p>&#60;meta http-equiv=&#34;X-UA-Compatible&#34; content=&#34;IE=edge&#34; /&#62;</p>
</p>
<p>&#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; media=&#34;screen&#34; href=&#34;css/redmond/jquery-ui-1.10.3.custom.css&#34; /&#62;</p>
<p>&#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; media=&#34;screen&#34; href=&#34;css/ui.jqgrid.css&#34; /&#62;</p>
</p>
<p>&#60;script src=&#34;js/jquery-1.9.0.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;</p>
<p>&#60;script src=&#34;js/i18n/grid.locale-en.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;</p>
<p>&#60;script src=&#34;js/jquery.jqGrid.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;</p>
</p>
<p>&#60;script type=&#34;text/javascript&#34;&#62;</p>
<p>$.jgrid.no_legacy_api = true;</p>
<p>$.jgrid.useJSON = true;</p>
</p>
<p>$(&#39;mylink&#39;).click(get_servers());</p>
</p>
<p>function get_alert(){</p>
<p>alert(&#34;this sucks!!!&#34;);</p>
<p>}</p>
</p>
<p>function get_servers() {</p>
<p>jQuery(&#34;#list10&#34;).jqGrid({</p>
<p>url:&#34;json/getServers.htm?hostName=&#34;+$(&#39;#hostName&#39;).val()+&#34;&#38;osType=&#34;+$(&#39;#osType&#39;).val()+&#34;&#38;processor=&#34;+$(&#39;#processor&#39;).val(),</p>
<p>datatype: &#34;json&#34;,</p>
<p>colNames:[&#39;_id&#39;,&#39;dMesg&#39;,&#39;nisName&#39;,&#39;id&#39;,&#39;hostName&#39;,&#39;hypervisor_name&#39;,&#39;parserVersion&#39;,&#39;osType&#39;,&#39;cpuInfo&#39;,&#39;memory_GB&#39;,&#39;blkId&#39;,&#39;extended_attributes&#39;,&#39;serverName&#39;,&#39;processor_reference&#39;,&#39;dnsName&#39;,&#39;processor_frequency_GHz&#39;,&#39;memInfo&#39;,&#39;df&#39;,&#39;packages&#39;,&#39;lsPci&#39;,&#39;osVersion&#39;,&#39;partitions&#39;,&#39;name&#39;,&#39;ypName&#39;,&#39;lines&#39;,&#39;ifConfig&#39;,&#39;mounts&#39;,&#39;processor_system_count&#39;,&#39;dmiInfo&#39;],</p>
<p>colModel:[</p>
<p>{name:&#39;_id&#39;,index:&#39;_id&#39;, key:true, width:50},</p>
<p>{name:&#39;dMesg&#39;,index:&#39;dMesg&#39;, width:50},</p>
<p>{name:&#39;nisName&#39;,index:&#39;nisName&#39;, width:50},</p>
<p>{name:&#39;id&#39;,index:&#39;id&#39;, width:50},</p>
<p>{name:&#39;hostName&#39;,index:&#39;hostName&#39;, width:50},</p>
<p>{name:&#39;hypervisor_name&#39;,index:&#39;hypervisor_name&#39;, width:50},</p>
<p>{name:&#39;parserVersion&#39;,index:&#39;parserVersion&#39;, width:50},</p>
<p>{name:&#39;osType&#39;,index:&#39;osType&#39;, width:50},</p>
<p>{name:&#39;cpuInfo&#39;,index:&#39;cpuInfo&#39;, width:50},</p>
<p>{name:&#39;memory_GB&#39;,index:&#39;memory_GB&#39;, width:50},</p>
<p>{name:&#39;blkId&#39;,index:&#39;blkId&#39;, width:50},</p>
<p>{name:&#39;extended_attributes&#39;,index:&#39;extended_attributes&#39;, width:50},</p>
<p>{name:&#39;serverName&#39;,index:&#39;serverName&#39;, width:50},</p>
<p>{name:&#39;processor_reference&#39;,index:&#39;processor_reference&#39;, width:50},</p>
<p>{name:&#39;dnsName&#39;,index:&#39;dnsName&#39;, width:50},</p>
<p>{name:&#39;processor_frequency_GHz&#39;,index:&#39;processor_frequency_GHz&#39;, width:50},</p>
<p>{name:&#39;memInfo&#39;,index:&#39;memInfo&#39;, width:50},</p>
<p>{name:&#39;df&#39;,index:&#39;df&#39;, width:50},</p>
<p>{name:&#39;packages&#39;,index:&#39;packages&#39;, width:50},</p>
<p>{name:&#39;lsPci&#39;,index:&#39;lsPci&#39;, width:50},</p>
<p>{name:&#39;osVersion&#39;,index:&#39;osVersion&#39;, width:50},</p>
<p>{name:&#39;partitions&#39;,index:&#39;partitions&#39;, width:50},</p>
<p>{name:&#39;name&#39;,index:&#39;name&#39;, width:50},</p>
<p>{name:&#39;ypName&#39;,index:&#39;ypName&#39;, width:50},</p>
<p>{name:&#39;lines&#39;,index:&#39;lines&#39;, width:50},</p>
<p>{name:&#39;ifConfig&#39;,index:&#39;ifConfig&#39;, width:50},</p>
<p>{name:&#39;mounts&#39;,index:&#39;mounts&#39;, width:50},</p>
<p>{name:&#39;processor_system_count&#39;,index:&#39;processor_system_count&#39;, width:50},</p>
<p>{name:&#39;dmiInfo&#39;,index:&#39;dmiInfo&#39;, width:50}</p>
<p>],</p>
<p>rowNum:10,</p>
<p>rowList:[10,20,30],</p>
<p>pager: &#39;#pager10&#39;,</p>
<p>sortname: &#39;id&#39;,</p>
<p>viewrecords: true,</p>
<p>sortorder: &#34;desc&#34;,</p>
<p>multiselect: false,</p>
<p>caption: &#34;Server list&#34;,</p>
<p>onSelectRow: function(ids) {</p>
<p>if(ids == null) {</p>
<p>ids=0;</p>
<p>if(jQuery(&#34;#list10_d&#34;).jqGrid(&#39;getGridParam&#39;,&#39;records&#39;) &#62;0 )</p>
<p>{</p>
<p>jQuery(&#34;#list10_d&#34;).jqGrid(&#39;setGridParam&#39;,{url:&#34;json/getCpuInfo.htm?_id=&#34;+ids,page:1});</p>
<p>jQuery(&#34;#list10_d&#34;).jqGrid(&#39;setCaption&#39;,&#34;CPU Info: &#34;+ids)</p>
<p>.trigger(&#39;reloadGrid&#39;);</p>
<p>}</p>
<p>} else {</p>
<p>jQuery(&#34;#list10_d&#34;).jqGrid(&#39;setGridParam&#39;,{url:&#34;json/getCpuInfo.htm?_id=&#34;+ids,page:1});</p>
<p>jQuery(&#34;#list10_d&#34;).jqGrid(&#39;setCaption&#39;,&#34;CPU Info: &#34;+ids)</p>
<p>.trigger(&#39;reloadGrid&#39;);</p>
<p>}</p>
<p>}</p>
<p>});</p>
<p>jQuery(&#34;#list10&#34;).jqGrid(&#39;navGrid&#39;,&#39;#pager10&#39;,{add:false,edit:false,del:false});</p>
<p>jQuery(&#34;#list10_d&#34;).jqGrid({</p>
<p>height: 100,</p>
<p>//url:&#39;get_json_subgrid?_id=0&#39;,</p>
<p>datatype: &#34;json&#34;,</p>
<p>colNames:[&#39;cpu family&#39;,&#39;model name&#39;,&#39;cache_alignment&#39;,&#39;vendor_id&#39;,&#39;flags&#39;],</p>
<p>colModel:[</p>
<p>{name:&#39;cpu family&#39;,index:&#39;cpu family&#39;, width:100},</p>
<p>{name:&#39;model name&#39;,index:&#39;model name&#39;, width:100},</p>
<p>{name:&#39;cache_alignment&#39;,index:&#39;cache_alignment&#39;, width:100},</p>
<p>{name:&#39;vendor_id&#39;,index:&#39;vendor_id&#39;, width:100},</p>
<p>{name:&#39;flags&#39;,index:&#39;flags&#39;, width:100}</p>
<p>],</p>
<p>rowNum:5,</p>
<p>rowList:[5,10,20],</p>
<p>pager: &#39;#pager10_d&#39;,</p>
<p>sortname: &#39;item&#39;,</p>
<p>viewrecords: true,</p>
<p>sortorder: &#34;asc&#34;,</p>
<p>multiselect: false,</p>
<p>caption:&#34;CPU Info&#34;</p>
<p>}).navGrid(&#39;#pager10_d&#39;,{add:false,edit:false,del:false});</p>
<p>jQuery(&#34;#ms1&#34;).click( function() {</p>
<p>var s;</p>
<p>s = jQuery(&#34;#list10_d&#34;).jqGrid(&#39;getGridParam&#39;,&#39;selarrrow&#39;);</p>
<p>alert(s);</p>
<p>});</p>
</p>
<p>}</p>
<p>&#60;/script&#62;</p>
<p>&#60;title&#62;Server search&#60;/title&#62;</p>
<p>&#60;/head&#62;</p>
<p>&#60;body&#62;</p>
<p>&#60;h1&#62;PM ADDM&#60;/h1&#62;</p>
<p>&#60;form method=&#34;get&#34; action=&#34;/&#34;&#62;</p>
<p>&#60;ul&#62;</p>
<p>&#60;li&#62;</p>
<p>&#60;input type=&#34;text&#34; name=&#34;hostName&#34; id=&#34;hostName&#34; placeholder=&#34;host name&#34; &#62;</p>
<p>&#60;/li&#62;</p>
<p>&#60;li&#62;</p>
<p>&#60;input type=&#34;text&#34; name=&#34;osType&#34; id=&#34;osType&#34; placeholder=&#34;operating system&#34; &#62;</p>
<p>&#60;/li&#62;</p>
<p>&#60;li&#62;</p>
<p>&#60;input type=&#34;text&#34; name=&#34;processor&#34; id=&#34;processor&#34; placeholder=&#34;processor family&#34; &#62;</p>
<p>&#60;/li&#62;</p>
<p>&#60;li&#62;</p>
<p>&#60;input type=&#34;button&#34; value=&#34;Search servers&#34; onclick=&#34;javascript:get_servers();&#34;&#62;</p>
<p>&#60;/li&#62;</p>
<p>&#60;/form&#62;</p>
<p>&#60;ul&#62;</p>
<p>&#60;li&#62;</p>
<p>&#60;a href=&#34;#&#34; id=&#34;mylink&#34; onclick=&#34;javascript:get_servers();&#34;&#62;Search servers&#60;/a&#62;</p>
<p>&#60;/li&#62;</p>
<p>&#60;li&#62;</p>
<p>&#60;div style=&#34;cursor: pointer;&#34; onclick=&#34;get_alert()&#34;&#62; Click here&#60;/div&#62;</p>
<p>&#60;/li&#62;</p>
<p>&#60;/ul&#62;</p>
</p>
<p>&#60;!--  --&#62;</p>
<p>Server List</p>
<p>&#60;table id=&#34;list10&#34;&#62;&#60;/table&#62;</p>
<p>&#60;div id=&#34;pager10&#34;&#62;&#60;/div&#62;</p>
<p>&#60;br /&#62;</p>
<p>CPU Info</p>
<p>&#60;table id=&#34;list10_d&#34;&#62;&#60;/table&#62;</p>
<p>&#60;div id=&#34;pager10_d&#34;&#62;&#60;/div&#62;</p>
</p>
<p>&#60;!--  --&#62;</p>
</p>
<p>&#60;/body&#62;</p>
</div>
]]></description>
        	        	<pubDate>Tue, 18 Jun 2013 00:30:43 +0300</pubDate>
        </item>
</channel>
</rss>