<?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: jqGrid dataUrl buildSelect returning undefined</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-dataurl-buildselect-returning-undefined</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/jqgrid-dataurl-buildselect-returning-undefined/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>sengaia on jqGrid dataUrl buildSelect returning undefined</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-dataurl-buildselect-returning-undefined#p29248</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-dataurl-buildselect-returning-undefined#p29248</guid>
        	        	<description><![CDATA[<p>Hi All,</p>
<p>In the Add Record dialog i was able to populate a combox with values returned from a WebMethod, using the editoptions { value: array} however I would like to be able to use the dataUrl and buildSelect in order to be able to specify the ID in the select list. The issue i&#39;m having when using the dataUrl is that also the request is being done, and data returned accordingly, i&#39;m unable to access the data. Below is my code:-</p>
</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;FirstName&#39;, index: &#39;FirstName&#39;, width: 90, editable:true, edittype: &#39;select&#39;, stype: &#39;select&#39;, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataUrl: &#39;DataServices/DataServices.asmx/GetFirstNames&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; buildSelect: function (data) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var requestData = data.d</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.each(requestData, function (index, value) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; console.log(value.FirstName);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }},</p>
</p>
<p>That is returning an undefined object. Any idea please cause this issue have been driving me crazy? The reason i would like to use the dataUrl instead of the value option, is that when i want to add a record, the data sent to the webmethod for firstname is the ID of the option which is generated when the select is generated.</p>
</p>
<p>Thanks</p></p>
]]></description>
        	        	<pubDate>Thu, 01 Aug 2013 01:33:52 +0300</pubDate>
        </item>
</channel>
</rss>