<?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: Editing: Enable/Disable for single rows?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/editing-enabledisable-for-single-rows</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/editing-enabledisable-for-single-rows/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Herbalite on Editing: Enable/Disable for single rows?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/editing-enabledisable-for-single-rows#p26579</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/editing-enabledisable-for-single-rows#p26579</guid>
        	        	<description><![CDATA[<p>Another note. The code above assumes that the action buttons are located at the rightmost cell.</p>
</p>
<p>If it&#39;s different, then you have change</p>
</p>
<p>jQuery(&#39;tr#&#39;+rowId+&#39; td:last div:first&#39;,jQuery(this)).hide();</p>
</p>
<p>to</p>
</p>
<p>jQuery(&#39;tr#&#39;+rowId+&#39; td:<span style="color: #800000;">nth-child(nnn)</span> div:first&#39;,jQuery(this)).hide();</p>
</p>
<p>nnn is starting with 1 for the first cell (according to CSS rules)</p></p>
]]></description>
        	        	<pubDate>Sat, 12 May 2012 08:37:04 +0300</pubDate>
        </item>
        <item>
        	<title>Herbalite on Editing: Enable/Disable for single rows?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/editing-enabledisable-for-single-rows#p26578</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/editing-enabledisable-for-single-rows#p26578</guid>
        	        	<description><![CDATA[<p>A bit late, had the same problem to solve today. Here is how I solved it: Use jqGrid&#39;s events and jQuery</p>
<p>Add or alter the following jqGrid Options when creating the grid:</p>
</p>
<p>gridview: false, // If set to true, the event below doesn&#39;t fire!</p>
<p>afterInsertRow: function(rowId, rowData, rowElem) {</p>
<p>// rowElem[nnn] column number to compare with (remember Javascript starts indexes at 0, so rowElem[2] selects the 3rd column)</p>
<p>// Adapt the if clause to other comparisions if needed</p>
<p>&#160; if (parseInt(rowElem[7]) == 0) {<br />&#160;&#160;&#160; jQuery(&#39;tr#&#39;+rowId+&#39; td:last div:first&#39;,jQuery(this)).hide();<br />&#160; }<br />&#160;&#160; return true;<br />},</p>
</p>
<p>This only hides the buttons. You still have to do checkup on the server side.</p>
</p>
<p>If you want to disable certain buttons only, you need to tell jQuery more specifically which button you&#39;d want to hide.</p>
<p>If you want to hide the delete button only, do</p>
<p>jQuery(&#39;tr#&#39;+rowId+&#39; td:last div:first <span style="color: #800000;">div.ui-inline-del</span>&#39;,jQuery(this)).hide();</p>
</p>
<p>If you want to hide the edit button only, do</p>
<p>jQuery(&#39;tr#&#39;+rowId+&#39; td:last div:first div.<span style="color: #800000;">ui-inline-edit</span>&#39;,jQuery(this)).hide();</p>
</p>
<p>etc.</p>
</p>
<p>Final note. If data changes from serve side on row basis, this can be extended to show hidden rows again. However this solution is probably good enough for most cases.</p>
]]></description>
        	        	<pubDate>Sat, 12 May 2012 06:35:24 +0300</pubDate>
        </item>
        <item>
        	<title>Wibdi on Editing: Enable/Disable for single rows?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/editing-enabledisable-for-single-rows#p26015</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/editing-enabledisable-for-single-rows#p26015</guid>
        	        	<description><![CDATA[<p>Hi folks,</p>
<p>is it possible to enable or disable the edit-function for single rows (datasets)?</p>
<p>For example:</p>
<p>With "formatter actions", you will have the edit and delete-icon placed in each row.</p>
<p>I want these icon to disappear ONLY in special rows (e.g if one cell-value within the row has the value "0")</p>
</p>
<p>I gave the "formatter actions" just as an example, because I like the direct visual connection between the icons and the related row.</p>
<p>For me, its even more import to achieve an edit-contoll based on row-values, not only on colModel.</p>
<p>Is there any solution in sight for me?</p>
</p>
<p>Thanks &#38; Best Regards</p>
<p>wibdi</p>
]]></description>
        	        	<pubDate>Sun, 26 Feb 2012 16:24:38 +0200</pubDate>
        </item>
</channel>
</rss>