<?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: Dynamic Column Selects</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-column-selects</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/dynamic-column-selects/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Dynamic Column Selects</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-column-selects#p15408</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-column-selects#p15408</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Please refer 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, 05 Mar 2010 13:23:37 +0200</pubDate>
        </item>
        <item>
        	<title>DOCMADRID on Dynamic Column Selects</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-column-selects#p15337</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-column-selects#p15337</guid>
        	        	<description><![CDATA[<p>Hi everyone,</p>
<p>First of all thanks for the great support and lessons i am getting with this forum, really helpful!</p>
<p>Im working for the first time with JqGrid and Im lost trying to get dynamic combos in 3 of my grid columns...I have read a lot of Topics about and they focus on the dynamic selects in the edit mode, so i couldnt find the solution for the "normal" column selects linking.</p>
<p>The thing, as you can image, is about a table with the columns&#160; "Region" "City" "Hospital", the selects get the options from a sql table but they are not linked and when the user select a region the second select is still displaying all the cities of the country, not only the cities relatives to that region, and the same with City and Hospital...I think you know what i mean, you can see the app online here "http://willbe.orgfree.com/ConsultAmiR/consultamirDemos/demos/demo1/consultamir.php"</p>
<p>I can post my code if you want, is there any chance to get that not so complicated (remember im new with JqGrid:)</p>
<p>Many thanks</p>
<p>Jonathan</p>
</p>
<p>PS: my grid.php code</p>
<p>// Connection to the server<br />$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);<br />// Tell the db that we use utf-8<br />$conn-&#62;query("SET NAMES utf8");<br />// Create the jqGrid instance<br />$grid = new jqGridRender($conn);<br />// Write the SQL Query<br />$grid-&#62;SelectCommand = &#39;SELECT Numero , Convocatoria, Especialidad, Provincia, Localidad, Centro FROM adjudicamir09&#39;;<br />// Set output format to json<br />$grid-&#62;dataType = &#39;json&#39;;<br />// Let the grid create the model<br />$grid-&#62;setColModel();<br />// Set the url from where we obtain the data<br />$grid-&#62;setUrl(&#39;grid.php&#39;);<br />// Set some grid options<br />$grid-&#62;setGridOptions(array(<br />&#160;&#160; &#160;&#160;&#160; &#160;"rowNum"=&#62;20,<br />&#160;&#160; &#160;&#160;&#160; &#160;"sortname"=&#62;"Numero",<br />&#160;&#160; &#160;&#160;&#160; &#160;"caption"=&#62;"ConsultAmiR 09 &#124; Abre este panel y busca lo que necesites! &#124; MUCHA SUERTE &#124; Equipo AMIR",<br />&#160;&#160; &#160;&#160;&#160; &#160;"rownumbers"=&#62;true,<br />&#160;&#160; &#160;&#160;&#160; &#160;"rownumWidth"=&#62;30,<br />&#160;&#160; &#160;&#160;&#160; &#160;"autowidth"=&#62;true,<br />&#160;&#160; &#160;&#160;&#160; &#160;"height"=&#62;&#39;auto&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;"scroll"=&#62;0,<br />&#160;&#160; &#160;&#160;&#160; &#160;"hiddengrid"=&#62;true,<br />&#160;&#160; &#160;&#160;&#160;&#160;&#160; ));</p>
<p>$grid-&#62;setColProperty("Numero", array("label"=&#62;"Numero", "width"=&#62;90, "search"=&#62;true, "align"=&#62;"center")); <br />$grid-&#62;setColProperty("Especialidad", array("label"=&#62;"Especialidad", "width"=&#62;200)); <br />$grid-&#62;setColProperty("Provincia", array("label"=&#62;"Provincia", "width"=&#62;200)); <br />$grid-&#62;setColProperty("Localidad", array("label"=&#62;"Localidad", "width"=&#62;150));<br />$grid-&#62;setColProperty("Centro", array("label"=&#62;"Centro", "width"=&#62;500));<br />$grid-&#62;setColProperty("Convocatoria", array("label"=&#62;"Convocatoria", "width"=&#62;90, "align"=&#62;"center"));</p>
<p>// Enable filter toolbar searching<br />$grid-&#62;toolbarfilter = true;</p>
<p>// we set the select</p>
<p>$grid-&#62;setSelect("Localidad", "SELECT DISTINCT Localidad, Localidad AS Provincia FROM adjudicamir09 ORDER BY `adjudicamir09`.`localidad` ASC", false, false, true, array(""=&#62;"Todas"));<br />$grid-&#62;setSelect("Provincia", "SELECT DISTINCT Provincia, Provincia AS Provincia FROM adjudicamir09 ORDER BY `adjudicamir09`.`Provincia` ASC", true, true, true, array(""=&#62;"Todas"));<br />$grid-&#62;setSelect("Especialidad", "SELECT DISTINCT Especialidad, Especialidad AS Especialidad FROM adjudicamir09 ORDER BY `adjudicamir09`.`Especialidad` ASC", false, false, true, array(""=&#62;"Todas"));<br />$grid-&#62;navigator = true;<br />$grid-&#62;setNavOptions(&#39;navigator&#39;, array("excel"=&#62;false,"add"=&#62;false,"edit"=&#62;false,"del"=&#62;false,"view"=&#62;true, "search"=&#62;true));<br />$grid-&#62;setSelect("Centro", "SELECT DISTINCT Centro, Centro AS Centro FROM adjudicamir09 ORDER BY `adjudicamir09`.`Centro` ASC", false, false, true, array(""=&#62;"Todos"));<br />$grid-&#62;setSelect("Convocatoria", "SELECT DISTINCT Convocatoria, Convocatoria AS Convoctoria FROM adjudicamir09 ORDER BY `adjudicamir09`.`Convocatoria` DESC", false, false, true, array(""=&#62;"Todas"));</p>
<p>$grid-&#62;renderGrid(&#39;#grid&#39;,&#39;#pager&#39;,true, null, null, true,true);<br />$conn = null;</p>
<p>?&#62;</p>
]]></description>
        	        	<pubDate>Wed, 03 Mar 2010 18:00:53 +0200</pubDate>
        </item>
</channel>
</rss>