<?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: Grid Forms and Select Boxes</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/grid-forms-and-select-boxes</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/grid-forms-and-select-boxes/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Grid Forms and Select Boxes</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-forms-and-select-boxes#p5987</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-forms-and-select-boxes#p5987</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Not sure what you mean with chining, but it is simple and you can do</p>
<p><strong>beforeShowForm:function(form_id{&#160; // BEGIN EVENT </strong>$(&#8221;select#ACTIVITY&#8221;,form_id).focus(function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; fillCombo(&#8221;./Actions/ActiveActivities.php&#8221;,&#8221;select#ACTIVITY&#8221;);</p>
<p>});</p>
<p>$(&#8221;select#EXPENSETYPE&#8221;,form_id).focus(function(){<br />&#160;&#160; fillCombo(&#8221;./Actions/ActiveExpenseTypes.php&#8221;,&#8221;select#EXPENSETYPE&#8221;);&#160;&#160;&#160; <br />});</p>
<p><strong>} //END beforeShowForm EVENT</strong></p>
<p>If you want this to happen only once use onInitializeForm with the same code.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 14 Apr 2009 01:15:31 +0300</pubDate>
        </item>
        <item>
        	<title>Nathan on Grid Forms and Select Boxes</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-forms-and-select-boxes#p5915</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-forms-and-select-boxes#p5915</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>I&#39;m trying to use the beforeShowForm event but I am still just having one box fire.</p>
<p>What I am looking to add is a focus event to each select box.&#160; When the box receives focus an ajax getJSON request is completed.&#160; This part is fine. The issue is that I have is attaching the event to the 3 select boxes so that only it&#39;s ajax call is completed. I think I have to chain the function calls somehow but I am unsure how and I can&#39;t find an example to illustrate this step.</p>
<p>I would prefer that each time the select box is clicked that the dropdown list is rebuilt rather than just once when the form is constructed - that&#39;s why I am trying to add the focus element to the beforeShowForm event.</p>
<p>Right now I am working with:</p>
<p>&#160;&#160;&#160; .navGrid(&#39;#expensesNav&#39;,{refresh:true,add:true,del:true,edit:false, search:false},{},{height:280,reloadAfterSubmit:true,beforeShowForm:function(form_id){$("select#ACTIVITY",form_id).focus(function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; //alert("trying ajax connection...");<br />&#160;&#160;&#160; &#160;&#160;&#160; fillCombo("./Actions/ActiveActivities.php","select#ACTIVITY");&#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; //fillCombo("./Actions/ActiveExpenseTypes.php","select#EXPENSETYPE");<br />&#160;&#160;&#160; })}function(form_id){$("select#EXPENSETYPE",form_id).focus(function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; fillCombo("./Actions/ActiveExpenseTypes.php","select#EXPENSETYPE");&#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; })}&#160;&#160;&#160; },{reloadAfterSubmit:true});</p>
<p>Any thoughts on how to chain/call my methods to add a focus command to the select boxes?</p>
<p>Nathan</p>
]]></description>
        	        	<pubDate>Tue, 07 Apr 2009 10:54:26 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Grid Forms and Select Boxes</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-forms-and-select-boxes#p5891</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-forms-and-select-boxes#p5891</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Use beforeShowForm - it is called every time you open the form.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 07 Apr 2009 07:53:59 +0300</pubDate>
        </item>
        <item>
        	<title>Nathan on Grid Forms and Select Boxes</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-forms-and-select-boxes#p5861</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-forms-and-select-boxes#p5861</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>On my form I have a few select boxes and I want to dynamically load the content. I&#39;ve wrote handlers to do this and it works fine except for one problem.&#160; When the form loads only one box will fire and I think it has to do with the onInitializeForm event - it only fires once.&#160; If I want to assign a focus event to each control how do I add it?&#160; Currently I am working with :</p>
<p>navGrid(&#39;#equipmentNav&#39;,{refresh:true,add:true,del:true,edit:false, search:false},{},&#160;&#160;&#160; {height:280,reloadAfterSubmit:true,onInitializeForm:function(form_id){$("select#ACTIVITY",form_id).focus(function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //alert("trying ajax connection...");<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; fillCombo("./Actions/ActiveActivities.php","select#ACTIVITY");</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; })},onInitializeForm:function(form_id){$("select#EQUIPMENT",form_id).focus(function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //alert("trying ajax connection...");<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; fillCombo("./Actions/ActiveEquipment.php","select#EQUIPMENT");&#160;&#160;&#160; </p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; })}},{reloadAfterSubmit:true});</p>
<p>as my navbar definition.&#160; I think there must be a way to chain these events but I am unsure how...</p>
<p>Nathan</p>
]]></description>
        	        	<pubDate>Mon, 06 Apr 2009 08:01:53 +0300</pubDate>
        </item>
</channel>
</rss>