<?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: Force some editable cells to be uneditable</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/force-some-editable-cells-to-be-uneditable</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/force-some-editable-cells-to-be-uneditable/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>DaJackel on Force some editable cells to be uneditable</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/force-some-editable-cells-to-be-uneditable#p21699</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/force-some-editable-cells-to-be-uneditable#p21699</guid>
        	        	<description><![CDATA[<p>I&#39;m having some issues getting some cells (in cellEdit mode) to be non-editable even though the column is set to editable.&#160;</p>
<p>I&#39;ve tried many ways, like beforeEditCell, formatters, etc. None seem to work.</p>
</p>
<p>The closest I&#39;ve got is by setting a formatter to the column that I&#39;d like to be editable and then using setCell to set the &#39;not-editable-cell&#39; class. Snippet below. The first time you click the cell, it unfortunately goes into edit mode, but if you click elsewhere and try to re-edit the cell, it&#39;s successfully&#160;uneditable. Any suggestions?</p>
</p>
<p>function noEditFormatter(cellValue, options, rowObject) {</p>
<p><span class="Apple-tab-span" style="white-space:pre"> if (cellValue == &#39;</span>test<span class="Apple-tab-span" style="white-space:pre">&#39;)</span></p>
<p><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-tab-span" style="white-space:pre"> jQuery("#grid").jqGrid(&#39;setCell&#39;, options.rowId, &#39;</span>ColName<span class="Apple-tab-span" style="white-space:pre">&#39;</span><span class="Apple-tab-span" style="white-space:pre">, &#39;&#39;, &#39;not-editable-cell&#39;);</span></span></p>
<p><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-tab-span" style="white-space: pre;"> </span>r</span>e</span>turn cellValue;</p>
<p>}</p>
</p>
<p>Edit: if I put the above code into beforeEditCell, it successfully stops the cell from being edited but in turn &#39;freezes&#39; the grid. You can no longer select any other cell.</p>
]]></description>
        	        	<pubDate>Sun, 16 Jan 2011 04:36:19 +0200</pubDate>
        </item>
</channel>
</rss>