<?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 select combo to a field in Edit Form</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-select-combo-to-a-field-in-edit-form</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-select-combo-to-a-field-in-edit-form/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Renso on Dynamic select combo to a field in Edit Form</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-select-combo-to-a-field-in-edit-form#p3095</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-select-combo-to-a-field-in-edit-form#p3095</guid>
        	        	<description><![CDATA[<p>Quite simply actually, I do it with all my selectables:</p>
<p>Do this before you define the jqGrid and make sure async is set to false.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2876' value='Select Code' data-codeid='sfcode2876' /></p>
<div class='sfcode' id='sfcode2876'>&#160;&#160;&#160; //get all products<br />&#160;&#160;&#160; var products = $.ajax({url: $(&#39;#ajaxAllProductsUrl&#39;).val(), <strong>async: false</strong>, success: function(data, result) {if (!result) alert(&#39;Failure to retrieve the Products.&#39;);}}).responseText;</div>
<p>The define your grid:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4253' value='Select Code' data-codeid='sfcode4253' /></p>
<div class='sfcode' id='sfcode4253'>&#160;&#160;&#160; $(item)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; .jqGrid({&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: listURL, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; postData: {ContractId : $(&#39;fieldset#ContractDetails #ContractId&#39;).val()},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: "json", <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39;Id&#39;, &#39;Product Name&#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;Id&#39;,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index:&#39;Id&#39;, sortable:true, editrules:{edithidden:false}}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;ProductName&#39;,&#160;&#160; index:&#39;ProductName&#39;, sortable:true, required:true, editable:true, edittype:"select", editoptions:{<strong>value:products</strong>}, editrules:{required:true}}],</div>
<p>You can also do it on the loadComplete event by using setColProp, which I do in some other cases as if you are going to have modal boxes for editing it will generate a runtime error if you do not have it set the following way:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit971' value='Select Code' data-codeid='sfcode971' /></p>
<div class='sfcode' id='sfcode971'>
<p>loadComplete: function()&#160;&#160;&#160; {$(item).setColProp(&#39;ProductName&#39;,{editoptions:{<strong>value:products</strong>}});</p>
</div>
<p>By the way "item" is the id of the grid. Hope this helps</p>
]]></description>
        	        	<pubDate>Sat, 15 Nov 2008 17:30:15 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Dynamic select combo to a field in Edit Form</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-select-combo-to-a-field-in-edit-form#p2645</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-select-combo-to-a-field-in-edit-form#p2645</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I will try to add this in next release. For now you can use a combination of loadComplete event again with setColProp to add extra fields of the select dynamically.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 22 Oct 2008 02:49:19 +0300</pubDate>
        </item>
        <item>
        	<title>Prathap MK on Dynamic select combo to a field in Edit Form</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-select-combo-to-a-field-in-edit-form#p2643</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-select-combo-to-a-field-in-edit-form#p2643</guid>
        	        	<description><![CDATA[<p>Hii,</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; How can i use data to be populated to a field of edittype: select, from database instead of using editoptions: {value: some values}. I cannot hardcode these value and has to populate from database. How can i do this?</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Since surl can be used only with filter grid, i cannot use that too.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Thanks in advance.</p>
<p>Regards,<br />Prathap.</p>
]]></description>
        	        	<pubDate>Wed, 22 Oct 2008 02:36:35 +0300</pubDate>
        </item>
</channel>
</rss>