<?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: Customize Add/ Edit dialog form</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/customize-add-edit-dialog-form</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/customize-add-edit-dialog-form/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>cruzz on Customize Add/ Edit dialog form</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customize-add-edit-dialog-form#p24647</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customize-add-edit-dialog-form#p24647</guid>
        	        	<description><![CDATA[<p>Well... here is the solution....</p>
</p>
<p>$("#list").jqGrid(&#39;navGrid&#39;,&#39;#pager&#39;,{</p>
<p><span style="white-space: pre;"> </span>edit:true, edittitle: &#39;Modify a Deployment&#39;,</p>
<p><span style="white-space: pre;"> </span>add:true, addtitle: &#39;Add a new Deployment&#39;,</p>
<p><span style="white-space: pre;"> </span>del:true, deltitle: &#39;Delete a Deployment&#39;},</p>
<p>{// edit option</p>
<p><span style="white-space: pre;"> </span>beforeShowForm: function(form) {</p>
<p><span style="white-space: pre;"> </span>$(&#39;#branch&#39;, form).attr("disabled","disabled");</p>
<p><span style="white-space: pre;"> </span>},</p>
<p><span style="white-space: pre;"> </span>editCaption: "Edit a Deployment"</p>
<p>},</p>
<p>{// add option</p>
<p><span style="white-space: pre;"> </span>beforeShowForm: function(form) {</p>
<p><span style="white-space: pre;"> </span>$(&#39;#branch option[value=""]&#39;, form).text(&#39;Select a branch&#39;)</p>
<p><span style="white-space: pre;"> </span>$(&#39;#branch option[value=""]&#39;, form).attr("selected", "selected");</p>
<p><span style="white-space: pre;"> </span>$(&#39;#branch&#39;, form).attr("disabled","");</p>
<p><span style="white-space: pre;"> </span>},</p>
<p><span style="white-space: pre;"> </span>addCaption: "Add a Deploymet"</p>
<p>},</p>
<p>{// delete option</p>
<p><span style="white-space: pre;"> </span>top:50,</p>
<p><span style="white-space: pre;"> </span>left:100,</p>
<p><span style="white-space: pre;"> </span>width:500</p>
<p>},</p>
<p>{// Search option</p>
<p><span style="white-space: pre;"> </span>multipleSearch:true</p>
<p>},</p>
<p>{// view option</p>
<p>}</p>
<p>);</p>
</p>
<p>I hope that will be useful for us</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Fri, 16 Sep 2011 17:12:43 +0300</pubDate>
        </item>
        <item>
        	<title>cruzz on Customize Add/ Edit dialog form</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customize-add-edit-dialog-form#p24607</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customize-add-edit-dialog-form#p24607</guid>
        	        	<description><![CDATA[<p>Hi.. I am really new with this !!!</p>
<p>and.. I am trying to tweak a lil the basic forms</p>
<p>I was reading a lot for comments here but I didn&#39;t&#160;find nothing for my case</p>
</p>
<p>I have this part of code for my table table</p>
<p>&#8230;.</p>
<p>colNames:[&#39;Deployment id&#39;,&#39;Branch&#39;, &#39;Release Name&#39;,&#39;Client id&#39;,&#39;# of hosts&#39;,&#39;Comments&#39;,&#39;&#39;],<br /> colModel :[</p>
<p>{name:&#39;deployment_id&#39;,index:&#39;deployment_id&#39;,align:"right", sorttype:"int", width:120}, <br /> {name:&#39;branch&#39;,index:&#39;branch&#39;,align:"center", editable: true,edittype:"select",editoptions:{value:"1:valor1;2:valor2;3:valor3"}}, <br /> {name:&#39;release_name&#39;,index:&#39;release_name&#39;,align:"center"}, <br /> {name:&#39;client_id&#39;,index:&#39;client_id&#39;,align:"right", sorttype:"int", width:60},        {name:&#39;num_hosts&#39;,index:&#39;num_hosts&#39;,align:"right", sorttype:"int", width:60},<br /> {name:&#39;comments&#39;,index:&#39;comments&#39;,align:"center", editable: true,edittype:"textarea", editoptions:{rows:"2",cols:"20"}}, <br /> {name:&#39;myac&#39;, width:80, fixed:true, sortable:false, resize:false, formatter:&#39;actions&#39;,formatoptions:{keys:true}}	       	              ],</p>
<p>&#8230;.</p>
<p>I need modify my edit/add dialog form in order to</p>
<p>When I add: Branch and Comment are available</p>
<p>When I edit: Only Comment can be modified</p>
</p>
<p>How I can know When I am Editting or Adding? in both cases are usign the same function "editGridRow"</p>
</p>
<p>In addition.. It&#39;s possible to get the options values in my Branch name from JSON? or a simple list? How i Can modify the editoptions for that?</p>
</p>
<p>Thank you <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
]]></description>
        	        	<pubDate>Tue, 13 Sep 2011 23:25:25 +0300</pubDate>
        </item>
</channel>
</rss>