<?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: 3.8 Beta - DefaultValue lost on Cancel</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel</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/bugs/3-8-beta-defaultvalue-lost-on-cancel/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on 3.8 Beta - DefaultValue lost on Cancel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19964</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19964</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Not sure what you mean. The defaultValue when set is a variable which has certain value. If you set defaultValue with varaible which changes dynamically maybe you will need to use beforeInitData event to change the defaultValue dynamically using setGridParam method.</p>
</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 23 Sep 2010 21:33:22 +0300</pubDate>
        </item>
        <item>
        	<title>sacobra on 3.8 Beta - DefaultValue lost on Cancel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19885</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19885</guid>
        	        	<description><![CDATA[<p>Does anyone know how to pass &#39;DefaultValue&#39; a variable instead of the actual value?</p>
]]></description>
        	        	<pubDate>Tue, 21 Sep 2010 01:13:20 +0300</pubDate>
        </item>
        <item>
        	<title>sacobra on 3.8 Beta - DefaultValue lost on Cancel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19725</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19725</guid>
        	        	<description><![CDATA[<p>I did try using the defaultValue option. &#160;I can&#39;t get it to work with variables though.</p>
<p>For example, the below does not seem to work.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1586' value='Select Code' data-codeid='sfcode1586' /></p>
<div class='sfcode' id='sfcode1586'>
<p>{name:&#39;occ&#39;, index:&#39;occ&#39;, editable:true, editoptions:{size:10, defaultValue: defOcc},</p>
<p>&#160;&#160;editrules:{required:true, number:true}},</p>
</div>
<p>However, if I replace the variable with a actual value it works!!</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5089' value='Select Code' data-codeid='sfcode5089' /></p>
<div class='sfcode' id='sfcode5089'>
<p>{name:&#39;occ&#39;, index:&#39;occ&#39;, editable:true, editoptions:{size:10, defaultValue: 10},</p>
<p>&#160;&#160;editrules:{required:true, number:true}},</p>
</div>
<p>The solution I&#39;m currently using is with the code I showed in my first post. &#160;I added</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9726' value='Select Code' data-codeid='sfcode9726' /></p>
<div class='sfcode' id='sfcode9726'>recreateForm: true</div>
<p>&#160;to make the default value appear every time.</p></p>
]]></description>
        	        	<pubDate>Sun, 12 Sep 2010 03:47:59 +0300</pubDate>
        </item>
        <item>
        	<title>tony on 3.8 Beta - DefaultValue lost on Cancel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19693</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19693</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>dataInit should not be interpreted as function which lunches evey time when we are in add mode.</p>
<p>This event raises only once if the element is created.</p>
<p>Please refer to documentation - there is a option for this purpose named defaultValue and is editoptions array:</p>
<p><a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules#editoptions" rel="nofollow" target="_blank"><a href="http://www.trirand.com/jqgridw" rel="nofollow">http://www.trirand.com/jqgridw</a>.....ditoptions</a></p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 11 Sep 2010 12:31:19 +0300</pubDate>
        </item>
        <item>
        	<title>sacobra on 3.8 Beta - DefaultValue lost on Cancel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19556</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/3-8-beta-defaultvalue-lost-on-cancel#p19556</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I&#39;m using Form Edit and have set a default Value for one of the field.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8935' value='Select Code' data-codeid='sfcode8935' /></p>
<div class='sfcode' id='sfcode8935'>
<p>{name:&#39;occ&#39;, index:&#39;occ&#39;, editable:true, editoptions:{size:10, dataInit : function(elm){</p>
<p>&#160;&#160; $(elm)[0].value = defOcc;</p>
<p>}}, editrules:{required:true, number:true}},</p>
</div>
<p>The default value is available the first time I add an entry. &#160;If I click Cancel or try to add another entry, the default value is lost.</p>
</p>
<p>Is this a bug that needs to be fixed?</p>
</p>
<p>Regards</p></p>
]]></description>
        	        	<pubDate>Tue, 07 Sep 2010 00:48:20 +0300</pubDate>
        </item>
</channel>
</rss>