<?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: Disabling edit controls based on other edit controls</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/disabling-edit-controls-based-on-other-edit-controls</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/disabling-edit-controls-based-on-other-edit-controls/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>jqwha on Disabling edit controls based on other edit controls</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/disabling-edit-controls-based-on-other-edit-controls#p18761</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/disabling-edit-controls-based-on-other-edit-controls#p18761</guid>
        	        	<description><![CDATA[<p>ooh. Just saw "dataEvents" in <a rel="nofollow" href="/jqgridwiki/doku.php?id=wiki:common_rules" target="_blank"></a><a href="http://www.trirand.com/jqgridw" rel="nofollow" target="_blank">http://www.trirand.com/jqgridw</a>.....mmon_rules</p>
<p>could this be it!? <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_smile.gif" alt=":-)" /></p>
<p>EDIT: Maybe not. Still doesn&#39;t help me to find the control that is to be disabled 🙁</p>
]]></description>
        	        	<pubDate>Fri, 23 Jul 2010 11:50:56 +0300</pubDate>
        </item>
        <item>
        	<title>jqwha on Disabling edit controls based on other edit controls</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/disabling-edit-controls-based-on-other-edit-controls#p18760</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/disabling-edit-controls-based-on-other-edit-controls#p18760</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I had a quick play around but couldn&#39;t get it to work exactly - I am using row-editing. I think I need to apply the class you mentioned to a "span" inside the cell to make it work. However, since I&#39;m going to have to do some DOM navigation to do that any way, I wondered if there were a similar method that would give me more control in the future.</p>
<p>i.e. I&#39;m experimenting with this: Say I have two columns, col1 has a pair of radios (Yes/No), col 2 has a dropdown list. I want to disable the dropdown if the user clicks radio "No", enable if "Yes"...</p>
<p>So I could apply a class to each radion/dropdown control (radio buttons have "classActionRadio", dropdownlists have "classActionDDL", etc). I use a jQuery.live call (on page startup) to ensure each radio control with "classActionRadio" has the attached event below (rough code):
</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(".classActionRadio").live(&#39;change&#39;, function(event) {<br />&#160;&#160; &#160;&#160;&#160;&#160; //lastgridsel will be set to the rowid being edited<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (lastgridsel) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var row = myGrid.getInd(lastgridsel, true)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //Now, if the radio button "No" is selected...<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (event.currentTarget.value == &#39;No&#39;) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; //Do some jQuery magic to find the "next" dropdownlist in the DOM with "classActionDDL" and disable it.<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; //enable the DDL.<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>Does that sound right? This is the bit where someone shows me the one line call that does it all 🙂 I feel like I&#39;m making this too complicated.</p>
<p>Thanks. I&#39;m looking forward to a time when I can ANSWER a question on here!</p>
]]></description>
        	        	<pubDate>Fri, 23 Jul 2010 11:43:23 +0300</pubDate>
        </item>
        <item>
        	<title>williamfjordan on Disabling edit controls based on other edit controls</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/disabling-edit-controls-based-on-other-edit-controls#p18746</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/disabling-edit-controls-based-on-other-edit-controls#p18746</guid>
        	        	<description><![CDATA[<p>I am doing a similar action based on a value from a select list in another cell.</p>
<p>My grid is in cell edit mode so your mileage may vary if you are in row edit mode.</p>
</p>
<p>I have a function in the beforeSaveCell event that checks if the cell being changed is the one with the dropdown.</p>
<p>Depending on the value selected I will enable / disable editing on 3 other cells in the same row.</p>
<p>To disable a cell from being editable, change the cssclass to &#39;not-editable-cell&#39;.</p>
<p>To make it editable again, remove that class.</p>
</p>
<p>Example:</p>
<p>&#160;&#160;&#160; function checkRQD(rowid, cellname, value, iRow, iCol) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //if not required, disallow editing of columns 4, 5, and 6<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (cellname == &#39;RQD&#39;) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var cssclass = &#39;&#39;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (value == &#39;4&#39;) {&#160;&#160;&#160;&#160;&#160; //Not required<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; cssclass = &#39;not-editable-cell&#39;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var row = theGrid.getInd(rowid, true)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; row.cells[4].className = cssclass;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; row.cells[5].className = cssclass;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; row.cells[6].className = cssclass;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; }</p>
]]></description>
        	        	<pubDate>Thu, 22 Jul 2010 17:04:30 +0300</pubDate>
        </item>
        <item>
        	<title>jqwha on Disabling edit controls based on other edit controls</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/disabling-edit-controls-based-on-other-edit-controls#p18745</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/disabling-edit-controls-based-on-other-edit-controls#p18745</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>If I have a grid where two of the columns are editable, one is a drop-down list and the other is a text box. Is it possible to enable/disable the textbox, based on value the user selects in the drop-down? i.e. the text box becomes editable only if they select "Yes" from the dropdown. It is not editable if they select "No".</p>
<p>I may end up using radio buttons instead of a dropdown but I&#39;m sure the logic would be the same? (N.B. I may not be able to use radios because they don&#39;t work in the grid in IE6 which is, unfortunately, still one of our target browsers 🙁 )</p>
</p>
<p>Thanks!</p>
]]></description>
        	        	<pubDate>Thu, 22 Jul 2010 16:49:04 +0300</pubDate>
        </item>
</channel>
</rss>