<?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: how to populate edit form dropdown from db</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-populate-edit-form-dropdown-from-db</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/how-to-populate-edit-form-dropdown-from-db/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Mike27516 on how to populate edit form dropdown from db</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-populate-edit-form-dropdown-from-db#p9859</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-populate-edit-form-dropdown-from-db#p9859</guid>
        	        	<description><![CDATA[<p>OK - my problem again. My sample data wasn&#39;t actually matching up witht e grid data. Corrected the sample dropdown values and voila - works like a charm. I am really digging jqgrid. I will use this a lot.</p>
</p>
<p>Mike</p>
]]></description>
        	        	<pubDate>Fri, 18 Sep 2009 11:12:14 +0300</pubDate>
        </item>
        <item>
        	<title>Mike27516 on how to populate edit form dropdown from db</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-populate-edit-form-dropdown-from-db#p9856</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-populate-edit-form-dropdown-from-db#p9856</guid>
        	        	<description><![CDATA[<p>OK - I&#39;ve got it populating the dropdown with the following format (found it on another topic):</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return "&#60;select&#62;&#60;option value=&#39;1&#39;&#62;Sideboom&#60;/option&#62;&#60;option value=&#39;2&#39;&#62;Truck&#60;/option&#62;&#60;option value=&#39;3&#39;&#62;Car&#60;/option&#62;&#60;/select&#62;";</p>
<p>I also removed the formatter: &#39;select&#39; from my column definition because I was getting &#39;undefined&#39; in my grid for every row in the equip_type column.</p>
</p>
<p><strong>Now my issue is getting the dropdown to have the correct selection in it on edit. It comes up with the dropdown unselected. Any suggestions much appreciated.</strong></p>
</p>
<p>Thanks.</p>
]]></description>
        	        	<pubDate>Fri, 18 Sep 2009 10:03:45 +0300</pubDate>
        </item>
        <item>
        	<title>Mike27516 on how to populate edit form dropdown from db</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-populate-edit-form-dropdown-from-db#p9853</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-populate-edit-form-dropdown-from-db#p9853</guid>
        	        	<description><![CDATA[<p>Hello - I am trying (desparately) to fill my edit form dropdown from a db call (LINQ specifically). I can&#39;t seem to get the format it likes because my dropdown always comes up empty. I know I&#39;m hitting my controller code because I&#39;m setting a break point in it and hitting it. As a test I am bypassing the db call and just passing back a string I think should work but is not . Please any suggestions much appreciated.&#160; I could not find in the doc the format it is looking for. Here&#39;s my code:</p>
<p>Controller: &#160;&#160;&#160;&#160;&#160;&#160;</p>
<p>public string GetTypes()<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; string strRet = "";</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return "1:Sideboom;2:Truck;3:Car";<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>aspx:</p>
<p>&#160;&#160;&#160; jQuery(document).ready(function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#sandgrid").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: &#39;/EquipTrack/GridData/&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editurl: &#39;/EquipTrack/Edit/&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;json&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; mtype: &#39;GET&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; height: 255,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width: 755,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: 5000,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;ID&#39;, &#39;Type&#39;, &#39;Make&#39;, &#39;Model&#39;, &#39;Year&#39;, &#39;Location&#39;, &#39;Insp Due&#39;, &#39;Serv Due&#39;, &#39;Miles/Hrs&#39;, &#39;Milage Dt&#39;, &#39;Reg By&#39;, &#39;Mngd By&#39;, &#39;Tag Exp&#39;,&#39;&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;equip_id&#39;, index: &#39;equip_id&#39;, width: 65, editable: true },<br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; {name: &#39;type_desc&#39;, index: &#39;type_desc&#39;, width: 130, editable: true, edittype: "select", formatter: &#39;select&#39;, editoptions: { dataUrl: &#39;/EquipTrack/GetTypes&#39;} }, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;make_descr&#39;, index: &#39;make_descr&#39;, width: 80, editable: true },</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; }).navGrid(&#39;#sandgridp&#39;,<br />&#160;&#160;&#160;&#160; {}, //options<br />&#160;&#160;&#160;&#160; {reloadAfterSubmit:false}, // edit options<br />&#160;&#160;&#160;&#160; {reloadAfterSubmit:false}, // add options<br />&#160;&#160;&#160;&#160; {reloadAfterSubmit:false}, // del options<br />&#160;&#160;&#160;&#160; {} // search options<br />&#160;&#160;&#160;&#160; );<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#sandgridp_center&#39;).remove();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#sandgridp_right&#39;).remove();<br />&#160;&#160;&#160; });</p>
]]></description>
        	        	<pubDate>Fri, 18 Sep 2009 09:29:21 +0300</pubDate>
        </item>
</channel>
</rss>