<?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: Dynamically Populate Select Dropdown </title>
	<link>http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown-1</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/dynamically-populate-select-dropdown-1/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Dynamically Populate Select Dropdown </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown-1#p19706</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown-1#p19706</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Yes this is true.</p>
<p>Use beforeShowForm &#8211; get the value from the first select and based on this value do a ajax and fill the second select.</p>
<p>We have a example in our commertial PHP component here.</p>
</p>
<p><a rel="nofollow" href="/blog/phpjqgrid/examples/editing_data/depend_listbox/default.php" target="_blank"></a><a href="http://www.trirand.com/blog/ph" rel="nofollow" target="_blank">http://www.trirand.com/blog/ph</a>.....efault.php</p>
</p>
<p>Click on PHP Tab to see the beforeShowForm code.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 11 Sep 2010 14:25:27 +0300</pubDate>
        </item>
        <item>
        	<title>donnazhen on Dynamically Populate Select Dropdown </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown-1#p19676</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown-1#p19676</guid>
        	        	<description><![CDATA[<p>Thank&#160;you Tony for replying for quickly first. But I think you&#39;re mistaken of my question. I do read the your suggested post several times before I posted this topic. Your example only works perfect in the adding records mode. The onchanged will be triggered also in the editing mode. But for the editing mode, the 2nd dropdown(State)&#160;should retrieve data first according to the 1st dropdown(Country) initiailly.&#160;My question is how to get the value of&#160;1st dropdown(Country) to make the 2nd dropdown load correct data first.&#160;&#160;And another question is because the form navigation is available, when user navigate dirrerent rows, the 2nd dropdown(State) should load data again according to the value of&#160;1st dropdown(Country).&#160;How can I make it work? Hope you can understand my question. Thank you.</p>
</p>
<p><a href="http://www.adgogo.com/cascding%20dropdown.JPG"><img src="http://www.adgogo.com/cascding%20dropdown.JPG" width="100"  class="sfimageleft spUserImage" alt="" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class="sfimageleft sfmouseleft" alt="Image Enlarger" /></a></p>
]]></description>
        	        	<pubDate>Fri, 10 Sep 2010 23:13:10 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Dynamically Populate Select Dropdown </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown-1#p19666</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown-1#p19666</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Please look here:</p>
<p><a href="http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown/&#038;value=dataEvents&#038;type=1&#038;include=1&#038;search=1&#038;ret=all" rel="nofollow" target="_blank"><a href="http://www.trirand.com/blog/?p" rel="nofollow">http://www.trirand.com/blog/?p</a>.....38;ret=all</a></p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 10 Sep 2010 19:19:07 +0300</pubDate>
        </item>
        <item>
        	<title>donnazhen on Dynamically Populate Select Dropdown </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown-1#p19658</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamically-populate-select-dropdown-1#p19658</guid>
        	        	<description><![CDATA[<p>I saw the<strong> Dynamically Populate Select Dropdown</strong>&#160;topic in this forum and my project is working fine when adding a new record in form editing, there&#39;s no problem. I&#39;m wondering how&#160;can I get the&#160;value of&#160;first dropdown&#160;to pass as parameter(<strong><span style="color: #ff0000;">initialid</span>)</strong> in the dataUrl of second dropdown box when editing rocords?</p>
</p>
<p>&#160;colModel:[</p>
<p>...</p>
<p>{name:&#39;select_one&#39;,</p>
<p>editable: true,</p>
<p>edittype:"select",</p>
<p>editoptions: {</p>
<p>dataUrl:&#39;test_one.php&#39;,</p>
<p>dataEvents :[</p>
<p>{ type: &#39;change&#39;, fn: function(e) {</p>
<p>var thisval = $(e.target).val();</p>
<p>$.get(&#39;test_two.php?myid=&#39;+thisval, function(data)</p>
<p>{ var res = $(data).html();</p>
<p>$("#select_two").html(res);</p>
<p>}); // end get</p>
<p>}//end func</p>
<p>} // end type</p>
<p>] // dataevents</p>
<p>} // edit option</p>
<p>},<br />{name:&#39;select_two&#39;,editable: true,edittype:"select", editoptions:{dataUrl:&#39;test_two.php?myid=<strong><span style="color: #ff0000;">initialid&#39;</span></strong>}}&#160;&#160;&#160; &#160;&#160;&#160;</p>
<p>&#8230;<br />],</p>
</p>
<p>Thank you in advanced.</p>
]]></description>
        	        	<pubDate>Fri, 10 Sep 2010 15:49:37 +0300</pubDate>
        </item>
</channel>
</rss>