<?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: editable dynamic selects using dataURL</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/editable-dynamic-selects-using-dataurl</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/editable-dynamic-selects-using-dataurl/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>saw on editable dynamic selects using dataURL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/editable-dynamic-selects-using-dataurl#p26032</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/editable-dynamic-selects-using-dataurl#p26032</guid>
        	        	<description><![CDATA[<p>Hi,</p>
</p>
<p>I&#39;m trying to set up dynamic selects with coldfusion too. Your example looks good. What is on your admin/cats.cfm?subcat=1&#39; page? I&#39;m trying to use a cfquery in a function on a cfc page. but it&#39;s not working yet.</p>
</p>
<p>Thank you</p>
]]></description>
        	        	<pubDate>Wed, 29 Feb 2012 00:48:48 +0200</pubDate>
        </item>
        <item>
        	<title>illiquent on editable dynamic selects using dataURL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/editable-dynamic-selects-using-dataurl#p25834</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/editable-dynamic-selects-using-dataurl#p25834</guid>
        	        	<description><![CDATA[<p>i found the solution on another post.</p>
<p>thanks tony!</p>
</p>
<p>here&#39;s the version I used:</p>
</p>
<p>$("document").ready(function() {<br />&#160;&#160; &#160;&#160;&#160; &#160;var lastsel2<br />&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#list2").jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;url:&#39;/beta/prodSelect.cfc?method=getAllGrid&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;width:"auto",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;height:"auto",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;datatype: "json",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;ID&#39;,&#39;ITEMNAME&#39;, &#39;CAT_ID&#39;,&#39;SUBCAT_ID&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colModel:[<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;ID&#39;,index:&#39;ID&#39;, width:30, key:true, hidden:true},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;ITEMNAME&#39;,index:&#39;ITEMNAME&#39;, width:200},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;CAT_ID&#39;,index:&#39;CAT_ID&#39;, width:150, editable: true,edittype:"select",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;editoptions: { <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;dataUrl: &#39;/admin/cats.cfm&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;dataEvents :[</p>
<p>{ type: &#39;change&#39;, fn: function(e) {</p>
<p>var thisval = $(e.target).val();</p>
<p>$.get(&#39;cats.cfm?subcat=1&#38;topCatID=&#39;+thisval, function(data)</p>
<p>{ var res = $(data).html();</p>
<p>var id = jQuery("#list2").jqGrid(&#39;getGridParam&#39;, &#39;selrow&#39;);<br />var t = &#39;#&#39; + id + &#39;_SUBCAT_ID&#39;;<br />$(t).html(res);<br />}); // end get</p>
<p>}//end func</p>
<p>} // end type</p>
<p>] // dataevents<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;} },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;SUBCAT_ID&#39;,index:&#39;SUBCAT_ID&#39;, width:150,editable: true,edittype:"select",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;editoptions: { dataUrl: &#39;/admin/cats.cfm?subcat=1&#39;} },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;onSelectRow: function(id){<br />&#160;&#160;&#160;&#160;&#160; if(id &#38;&#38; id!==lastsel2){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#39;#list2&#39;).restoreRow(lastsel2);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#39;#list2&#39;).editRow(id,true,&#39;1&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lastsel2=id;<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;rowNum:30,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;rowList:[30,60,90],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;pager: &#39;#pager2&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;sortname: &#39;thisid&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;sortorder: "asc",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;editurl: "/admin/qry_itemCorrect.cfm",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;caption:"Your Items"<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;});<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;});</p>
]]></description>
        	        	<pubDate>Sun, 29 Jan 2012 06:23:02 +0200</pubDate>
        </item>
        <item>
        	<title>illiquent on editable dynamic selects using dataURL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/editable-dynamic-selects-using-dataurl#p25832</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/editable-dynamic-selects-using-dataurl#p25832</guid>
        	        	<description><![CDATA[<p>hi.</p>
<p>i&#39;ve got a jGrid reading data in with json, with an Item, Category, SubCategory.</p>
<p>The goal is to have the category and subcategory be editable, and the subcategory select should depend on category.</p>
<p>ie if a category is changed, the subcategories refresh. on the subcategory change, the page should post the data.</p>
</p>
<p>I think that using the formatter: "select" option might be what I want, but I&#39;m not finding any useful documentation or examples on it.</p>
<p>here&#39;s what I have in my colModel</p>
</p>
<p>colModel:[<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;ID&#39;,index:&#39;ID&#39;, width:30, key:true, hidden:true},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;ITEMNAME&#39;,index:&#39;ITEMNAME&#39;, width:200},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;CAT_ID&#39;,index:&#39;CAT_ID&#39;, width:150, editable: true,edittype:"select",formatter: "select",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;editoptions: { dataUrl: &#39;/admin/cats.cfm&#39;} },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;SUBCAT_ID&#39;,index:&#39;SUBCAT_ID&#39;, width:150,editable: true,edittype:"select",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;editoptions: { dataUrl: &#39;/admin/cats.cfm?subcat=1&#39;} },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;],</p>
</p>
<p>when i use formatter: select, the select box is blank</p>
<p>when I don&#39;t, they work fine.</p>
<p>I realize the code above isn&#39;t going to do what I need, but I&#39;m hoping it might show what I&#39;m trying to do.</p>
</p>
<p>Is there an example in the docs themselves for dynamic select boxes?</p>
<p>I&#39;ve seen lots of suggested solutions in forums, but none of them make sense or work for my situation.</p>
<p>I know this is a common task, so I&#39;m surprised to see its not better documented or why so many people seem confused on it.</p>
]]></description>
        	        	<pubDate>Sun, 29 Jan 2012 02:43:00 +0200</pubDate>
        </item>
</channel>
</rss>