<?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: Question about "add row" with form edit and form validation</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/question-about-add-row-with-form-edit-and-form-validation</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/question-about-add-row-with-form-edit-and-form-validation/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Question about "add row" with form edit and form validation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/question-about-add-row-with-form-edit-and-form-validation#p5220</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/question-about-add-row-with-form-edit-and-form-validation#p5220</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>...navGrid(&#39;#pager&#39;, {refresh:true,edit:false,add:true,del:true,search:false}.</p>
<p>{}, // edit options</p>
<p>{height:300,width:600} // add optins</p>
<p>...</p>
<p>);</p>
]]></description>
        	        	<pubDate>Wed, 11 Mar 2009 02:44:14 +0200</pubDate>
        </item>
        <item>
        	<title>jonnycattt on Question about "add row" with form edit and form validation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/question-about-add-row-with-form-edit-and-form-validation#p5174</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/question-about-add-row-with-form-edit-and-form-validation#p5174</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>&#160; Thanks for replying. I don&#39;t understand your first answer (Sorry!). Could you elaborate with a code sample or show me where in the docs this is specified?</p>
</p>
<p>thanks a lot.</p>
<p>marc</p>
]]></description>
        	        	<pubDate>Fri, 06 Mar 2009 16:10:35 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Question about "add row" with form edit and form validation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/question-about-add-row-with-form-edit-and-form-validation#p5030</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/question-about-add-row-with-form-edit-and-form-validation#p5030</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>1. You shouls set the width and height in both edit and add options instead that they use the same method.</p>
<p>2. This is done in editrules array in colModel - refer to docs.</p>
<p>3. No special option, but you can use beforeShowForm event for this purpose.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 28 Feb 2009 14:43:12 +0200</pubDate>
        </item>
        <item>
        	<title>jonnycattt on Question about "add row" with form edit and form validation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/question-about-add-row-with-form-edit-and-form-validation#p4978</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/question-about-add-row-with-form-edit-and-form-validation#p4978</guid>
        	        	<description><![CDATA[<p>Greetings all. I&#39;ve got an editable form, and I&#39;m using the "add" button that comes by default in the pager. I know I&#39;m missing something stupid, but I can&#39;t figure out how to customize the size of the "add" form when it pops up. The "edit" form is sized correctly from the options I pass in editGridRow. (I&#39;ll post all my code below).</p>
<p>Another question: is basic form validation baked into the form editing? for example, I just want to mark some fields as required. I tried using required:true in my colModel, but that appeared to have no effect.</p>
<p>Finally, is there a way to provide default values for form fields when "add row" is clicked and the new form pops up?</p>
<p>thanks!</p>
<p>Marc</p>
</p>
<p>&#160;&#160;&#160; <br />$(document).ready(function(){<br />&#160;&#160;&#160; $("#qGrid").jqGrid(<br />&#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; url:&#39;blahblahblah&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; datatype:&#39;json&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; colNames:[&#39;ID&#39;, &#39;Name&#39;, &#39;Set up?&#39;,&#39;Standard?&#39;, &#39;Dev Root&#39;, &#39;Test Root&#39;, &#39;Prod Compare Root&#39;, &#39;Filter&#39;],<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;deploymenttypeid&#39;,index:&#39;deploymenttypeid&#39;,width:30,hidden:true},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;deploymenttypename&#39;,index:&#39;deploymenttypename&#39;,editable:true,edittype:&#39;text&#39;,width:180},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;isconfigured&#39;,index:&#39;isconfigured&#39;,editable:false,width:50,formatter:notConfiguredFormatter},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;isstandard&#39;,index:&#39;isstandard&#39;,editable:false,width:75, formatter:yesNoFormatter},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;devroot&#39;,index:&#39;devroot&#39;,editable:true,edittype:&#39;text&#39;,width:200,formatter:devRootFormatter},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;testroot&#39;,index:&#39;testroot&#39;,editable:true,edittype:&#39;text&#39;,width:200,formatter:testRootFormatter},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;prodcompareroot&#39;,index:&#39;prodcompareroot&#39;,editable:true,edittype:&#39;text&#39;,width:200,formatter:prodCompareRootFormatter},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;excludesfilter&#39;,index:&#39;excludesfilter&#39;,editable:true,edittype:&#39;text&#39;,width:150}&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; ],&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; ondblClickRow: function(id){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var gr = $("##qGrid").getGridParam(&#39;selrow&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(gr!=null){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $("#qGrid").editGridRow(gr,{height:300,width:600,closeAfterAdd:true,closeAfterEdit:true,recreateForm:true});<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; },&#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; afterInsertRow:&#160; function(rowid,rowdata,rowelem){rowComplete(rowid,rowdata,rowelem)},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; height:&#39;100%&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: $("#pager"),<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; viewrecords:true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; caption:&#39;Edit Deployments&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; imgpath:&#39;#application.webroot#scripts/jquery/plugins/jqGrid/themes/basic/images&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; editurl:&#39;blahblah&#39;<br />&#160;&#160;&#160; &#160;&#160;&#160; }&#160;&#160;&#160; <br />&#160;&#160;&#160; );&#160;&#160;&#160; <br />&#160;&#160;&#160; $("##qGrid").navGrid("##pager",{refresh:true,edit:false,add:true,del:true,search:false});<br />});</p></p>
]]></description>
        	        	<pubDate>Thu, 26 Feb 2009 07:28:58 +0200</pubDate>
        </item>
</channel>
</rss>