<?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: Dynamically change colModel according to cell value</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/dynamically-change-colmodel-according-to-cell-value-1</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/dynamically-change-colmodel-according-to-cell-value-1/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>FrancoisPerez on Dynamically change colModel according to cell value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamically-change-colmodel-according-to-cell-value-1#p22904</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamically-change-colmodel-according-to-cell-value-1#p22904</guid>
        	        	<description><![CDATA[<p>Hi everyone,</p>
</p>
<p>I&#39;m having a problem with the implementation of my jqGrid in my site.</p>
<p>What I&#39;d like to do is make an attribute editable only if the value of a certain cell within a line is TRUE or FALSE.</p>
<p>It seem to work on the first row selection, but when a click another line the parameters stays unchanged.</p>
</p>
<p>Here is what I did :</p>
<p>beforeSelectRow: function(rowid, e) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var data = jQuery("#myGrid").jqGrid(&#39;getRowData&#39;,rowid);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if( data["regimeReel"] == "false" ){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#myGrid").setColProp(&#39;columnOne&#39;,{editable : true }); <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#myGrid").setColProp(&#39;columnTwo&#39;,{editable : false }); <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;} else {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#myGrid").setColProp(&#39;columnOne&#39;,{editable : false }); <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#myGrid").setColProp(&#39;columnTwo&#39;,{editable : true }); <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160;&#160; return true;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}</p>
</p>
<p>Thanks to any helping hand <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" /></p>
]]></description>
        	        	<pubDate>Fri, 22 Apr 2011 18:12:05 +0300</pubDate>
        </item>
</channel>
</rss>