<?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: Submit buttons in jqGrid - creating, disabling &#38; enabling</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/submit-buttons-in-jqgrid-creating-disabling-enabling</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/submit-buttons-in-jqgrid-creating-disabling-enabling/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>steve_o on Submit buttons in jqGrid - creating, disabling &#38; enabling</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/submit-buttons-in-jqgrid-creating-disabling-enabling#p28869</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/submit-buttons-in-jqgrid-creating-disabling-enabling#p28869</guid>
        	        	<description><![CDATA[<p>Please disregard the post above. &#160;</p>
</p>
<p>Asking a better question in a new post regarding some of the above.</p>
]]></description>
        	        	<pubDate>Thu, 23 May 2013 16:44:44 +0300</pubDate>
        </item>
        <item>
        	<title>steve_o on Submit buttons in jqGrid - creating, disabling &#38; enabling</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/submit-buttons-in-jqgrid-creating-disabling-enabling#p28863</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/submit-buttons-in-jqgrid-creating-disabling-enabling#p28863</guid>
        	        	<description><![CDATA[<p>I have been asked to put buttons inside a jqGrid, but they will not be used for editing the contents of the grid. &#160;They will be a submit button that will sit at the end of each row, and will be greyed out/disabled until the <strong>onSelectRow</strong> fires.</p>
</p>
<p>Based on a couple examples I have found, I&#39;m able to create the buttons as follows:</p>
</p>
<blockquote>
<p>var ids = $("#myGrid").jqGrid("getDataIDs");</p>
<p>for (var i=0;i &#60; ids.length;i++) {</p>
<p>var cl = ids[i];</p>
<p>sm = "&#60;input style=&#39;height:25px;width:65px;&#39; type=&#39;submit&#39; value=&#39;Re-Send&#39; <span style="color: #ff0000;">onclick="$(&#39;#myGrid&#39;).editRow(&#39;"+cl+"&#39;);"</span> /&#62;";</p>
<p>ca = "&#60;input style=&#39;height:25px;width:55px;&#39; type=&#39;button&#39; value=&#39;Cancel&#39; <span style="color: #ff0000;">onclick="$(&#39;#myGrid&#39;).editRow(&#39;"+cl+"&#39;);"</span> /&#62;";</p>
<p>$("#myGrid").jqGrid("setRowData",ids[i], {msgAct:sm+ca});</p>
<p>}</p>
</blockquote>
<p><span style="color: #000000;">The text in red above I know won&#39;t be in my code, I&#39;m only using it as a placeholder right now. Also, the code is in the <strong>loadComplete</strong> event. &#160; The buttons are being created, but I&#39;m lost as to how to disable them within the for loop.</span></p>
</p>
<p><span style="color: #000000;">What I need to do is the following:</span></p>
<ol>
<li>Once each of the 2 buttons (in the Action column) has been created, I need to disable both of them. &#160;How do you do this inside the jqGrid programatically? &#160;</li>
<li>In the <strong>onSelectRow</strong> event I&#39;ll get the row data I need, and want the <strong>Re-Send</strong> &#38; <strong>Cancel</strong> buttons to become active on <span style="text-decoration: underline;">that</span> <span style="text-decoration: underline;">row only</span>. &#160;</li>
<li>Within the <strong>onSelectRow</strong> event is where I will look for the <strong>click</strong> event for the two submit buttons for that row. &#160;</li>
<li>Until the row is selected, the buttons should be disabled.</li>
</ol>
<p>Also, should the 2 buttons on each row be disabled in the loop, or after it finishes? &#160;</p>
</p>
<p>Thanks!</p>
]]></description>
        	        	<pubDate>Wed, 22 May 2013 23:08:30 +0300</pubDate>
        </item>
</channel>
</rss>