<?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: Is it possible to toggle setColProp editable dynamically?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/is-it-possible-to-toggle-setcolprop-editable-dynamically</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/is-it-possible-to-toggle-setcolprop-editable-dynamically/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Is it possible to toggle setColProp editable dynamically?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/is-it-possible-to-toggle-setcolprop-editable-dynamically#p5802</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/is-it-possible-to-toggle-setcolprop-editable-dynamically#p5802</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The beforeInitData is the right place for this. The only additional parameter that you should set is:</p>
<p>recreateForm : true;</p>
<p>This recreates the form every time.</p>
<p>Another possible solution is to use beforeShowForm event where you can show and hide some columns according to condition. Every column in the form (label + input field)&#160; is combination of tr_+column_name from colModel. Something like $("#tr_account").hide()&#160; will hide the account input again with the label.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 03 Apr 2009 02:09:05 +0300</pubDate>
        </item>
        <item>
        	<title>alan on Is it possible to toggle setColProp editable dynamically?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/is-it-possible-to-toggle-setcolprop-editable-dynamically#p5792</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/is-it-possible-to-toggle-setcolprop-editable-dynamically#p5792</guid>
        	        	<description><![CDATA[<p>I have tried several Form Events, like BeforeShow Form, but I&#39;m not quite sure how to accomplish the following goal.</p>
<p>Let&#39;s say I have 5 columns in my grid. I want 4 columns to be <strong>editable:true</strong> when adding a new record. I only want 1 field to be <strong>editable:true</strong> upon editing.</p>
<p>I found SetColProp, and was thinking I could change the value of <strong>editable </strong>by&#160; potentially passing it as a button parameter for both add and edit within the NavGrid definition.</p>
<p>I have tried several variations of the following code (upon several different events), but am not getting the behavior that I am looking for.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5118' value='Select Code' data-codeid='sfcode5118' /></p>
<div class='sfcode' id='sfcode5118'>
<p>beforeInitData:function(){$("#list").setColProp(&#39;account&#39;,{editable:false});},</p>
<p>beforeInitData:function(){$("#list").setColProp(&#39;account&#39;,{editable:true}).trigger("reloadGrid");},</p>
</div>
<p>Anybody tried this before? One thing I did try, was creating <strong>account </strong>and a separate <strong>add_account </strong>field. I was working with the <strong>hidden </strong>and <strong>hidedlg</strong> properties,<strong> </strong>but the road I was heading down was getting a bit messy... Thx in advance.</p>
<p>-Alan</p>
]]></description>
        	        	<pubDate>Thu, 02 Apr 2009 15:51:04 +0300</pubDate>
        </item>
</channel>
</rss>