<?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: Default Value in Add Form</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/default-value-in-add-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/default-value-in-add-form/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Default Value in Add Form</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/default-value-in-add-form#p1642</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/default-value-in-add-form#p1642</guid>
        	        	<description><![CDATA[<p>If you use navigator in add option use beforeShowForm event</p>
<p>something like this:</p>
<p>beforeShowForm : function(form_id) {</p>
<p>if(some_condition) {</p>
<p>jQuery(&#8221;#name_from_colmodel&#8221;,formid).val(&#8221;myvalue&#8221;);</p>
<p>}</p>
<p>}</p>
]]></description>
        	        	<pubDate>Thu, 21 Aug 2008 02:45:39 +0300</pubDate>
        </item>
        <item>
        	<title>Tommy1402 on Default Value in Add Form</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/default-value-in-add-form#p1638</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/default-value-in-add-form#p1638</guid>
        	        	<description><![CDATA[<p>Well, I managed to solve it somehow. But, I don&#39;t know wether this solution is optimal or not.</p>
<p>here&#39;s the code:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6706' value='Select Code' data-codeid='sfcode6706' /></p>
<div class='sfcode' id='sfcode6706'>onInitializeForm: function(formid) { <br />&#160; var master_id = jQuery(gridInits[0].section).getGridParam(&#39;selrow&#39;);<br />&#160; var masterdata = jQuery(gridInits[0].section).getRowData(master_id);<br /><strong>jQuery("#subject_id",formid).attr("value",masterdata.subject_id);}</strong></div>
</p>
<p>First I use:&#160;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8339' value='Select Code' data-codeid='sfcode8339' /></p>
<div class='sfcode' id='sfcode8339'><strong>jQuery("#subject_id", formid).value(masterdata.subject_id)</strong>;</div>
<p>But not working.</p></p>
]]></description>
        	        	<pubDate>Thu, 21 Aug 2008 00:19:58 +0300</pubDate>
        </item>
        <item>
        	<title>Tommy1402 on Default Value in Add Form</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/default-value-in-add-form#p1633</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/default-value-in-add-form#p1633</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I use Master Detail demo. When the ParentGrid is selected, it changes the ChildGrid url.</p>
<p>jQuery("#list10_d").setGridParam({url:"subgrid.php?q=1&#38;amp;id="+ids,page:1})</p>
<p>Okay. I added an Edit and Add navGrid. Everything is fine actually. the Edit action is working and so is the Add action.</p>
<p>One thing I found in Add action is, the default value for all of the field is blank. Now, how can I add a custom default value for it? like when the Add button is pressed in the ChildGrid, the custom field value depends on the selected row in ParentGrid ? Maybe when the Add button is pressed, the default Item Name is the same with the selected row Client Name... something like that...</p>
<p>thanks for the help.</p></p>
]]></description>
        	        	<pubDate>Wed, 20 Aug 2008 13:33:55 +0300</pubDate>
        </item>
</channel>
</rss>