<?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: json add form problem. .removeAttr("readonly") to work the column still disabled</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/json-add-form-problem-removeattrreadonly-to-work-the-column-still-disabled</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/json-add-form-problem-removeattrreadonly-to-work-the-column-still-disabled/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>shilo.k on json add form problem. .removeAttr("readonly") to work the column still disabled</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-add-form-problem-removeattrreadonly-to-work-the-column-still-disabled#p30233</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-add-form-problem-removeattrreadonly-to-work-the-column-still-disabled#p30233</guid>
        	        	<description><![CDATA[<p>hello all</p>
</p>
<p>in add action i want to remove the readonly attribute from column "<span style="text-decoration: underline;"><strong>applName</strong></span>" To enable Enter values in .</p>
<p>so i use this command :</p>
<p>&#160;&#160;&#160;&#160;$("#id.applName", formid).removeAttr("readonly");</p>
<p>&#160;but it&#160; not work &#160;and the column still disabled from update.</p>
<p>before, where my jsonString was simple, like :</p>
<p>&#160;{"id":"10","applName":"appl1","group":"g1",field:"f1"}</p>
<p>&#160; the command&#160;:&#160;&#160;$("#applName", formid).removeAttr("readonly");&#160; work well</p>
</p>
<p>but now because new &#160;jsonString sturcture :</p>
<p>{"id":{"applName":"appl1","group":"g1"},field:"f1"}</p>
<p>i must used&#160;&#160;&#160;$("#id.applName", formid).removeAttr("readonly");</p>
<p>and there&#160;no error message&#160;and &#160;the column still disabled for update</p>
<p>my jqgrid source:</p>
<blockquote>
<p><strong><span style="color: #0000ff;">jQuery("#listsg11").jqGrid({<br />&#160;</span></strong><a href="/blog/&#39;&#60;%=request.getContextPath()%&#62;/ViewAppl?oper=select&#39;" target="_blank"><strong><span style="color: #0000ff;">url:&#39;&#60;%=request.getContextPath()%&#62;/ViewAppl?oper=select&#39;</span></strong></a><strong><span style="color: #0000ff;">,<br />&#160;editurl:&#39;&#60;%=request.getContextPath()%&#62;/ViewAppl&#39;,<br />&#160;datatype: "json",<br />&#160;jsonReader : {<br />&#160;&#160;&#160;&#160; root: "rows",<br />&#160;&#160;&#160;&#160; page: "page",<br />&#160;&#160;&#160;&#160; total: "total",<br />&#160;&#160;&#160;&#160; records: "records",<br />&#160;&#160;&#160;&#160; repeatitems: true,<br />&#160;&#160;&#160;&#160; cell: "",<br />&#160;&#160;&#160;&#160; width:400,<br />&#160;&#160;&#160;&#160; id: "0"},</span></strong></p>
<p><strong><span style="color: #0000ff;">....</span></strong></p>
<p><strong><span style="color: #0000ff;">colNames:[&#39;id&#39;,&#39;applName&#39;,&#39;groupName&#39;, &#39;description&#39;, &#39;applExit&#39;,&#39;applSource&#39;],<br />&#160;&#160; &#160;colModel:[<br />&#160;&#160; &#160;&#160;{name:&#39;id&#39;,index:&#39;id&#39;,hidden:true, width:55, editable: true,editoptions: {maxlength:8, readonly: &#39;readonly&#39; }},<br />&#160;&#160; &#160;&#160;{name:&#39;id.applName&#39;,index:&#39;id.applName&#39;, width:55, editable: true,editoptions: {maxlength:8, readonly: &#39;readonly&#39; }},<br />&#160;&#160; &#160;&#160;{name:&#39;id.groupName&#39;,index:&#39;id.groupName&#39;, width:90,editable: true,editoptions: {maxlength:8}},<br />&#160;&#160; &#160;&#160;{name:&#39;description&#39;,index:&#39;description&#39;, width:100,editable:true,color:&#39;blue&#39;,background:&#39;background&#39;},<br />&#160;&#160; &#160;&#160;{name:&#39;applExit&#39;,index:&#39;applExit&#39;, width:80, align:"right",editable:true},<br />&#160;&#160; &#160;&#160;{name:&#39;applSource&#39;,index:&#39;applSource&#39;, width:80,search:false, align:"right",editable:true,<br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; edittype: &#39;select&#39;,editoptions: {value: s:sql;b:DB2&#39;}}<br />&#160;&#160; &#160;],<br />&#160;&#160; &#160;loadonce: true,</span></strong></p>
<p><strong><span style="color: #0000ff;">.....</span></strong></p>
<p><span style="color: #0000ff;"><strong>jQuery("#listsg11").jqGrid(&#39;navGrid&#39;,&#39;#pagersg11&#39;,{pgbuttons:false,search:false,view:true,add:true,edit:true,del:true},<br />&#160;&#160;{ // edit dialog options<br />&#160;&#160;&#160; checkOnUpdate:true,<br />&#160;&#160;&#160; closeAfterEdit:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; beforeShowForm : function (formid){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;$("#id.applName", formid).attr("readonly","true");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160; }<br />&#160;&#160;&#160;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Add dialog options<br />&#160;&#160;{<br />&#160;&#160; checkOnUpdate:true,<br />&#160;&#160; closeAfterAdd:true,<br />&#160;&#160;&#160; beforeShowForm : function (formid){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;$("#id.applName", formid).removeAttr("readonly");<br />&#160;&#160;&#160;&#160;}&#160;<br />&#160;);</strong><br /></span></p>
</blockquote>
<p><span style="color: #0000ff;">&#160;</span></p>
]]></description>
        	        	<pubDate>Wed, 12 Feb 2014 09:30:01 +0200</pubDate>
        </item>
</channel>
</rss>