<?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: all usage of buildSelect should be inside of $.ajax.success</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/all-usage-of-buildselect-should-be-inside-of-ajax-success</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/bugs/all-usage-of-buildselect-should-be-inside-of-ajax-success/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on all usage of buildSelect should be inside of $.ajax.success</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/all-usage-of-buildselect-should-be-inside-of-ajax-success#p24261</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/all-usage-of-buildselect-should-be-inside-of-ajax-success#p24261</guid>
        	        	<description><![CDATA[<p>Absolutley.</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 14 Aug 2011 11:52:13 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on all usage of buildSelect should be inside of $.ajax.success</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/all-usage-of-buildselect-should-be-inside-of-ajax-success#p24174</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/all-usage-of-buildselect-should-be-inside-of-ajax-success#p24174</guid>
        	        	<description><![CDATA[<p>Hallo Tony,</p>
<p>in the jqGrid version 4.1.2 there are two places where <strong>buildSelect</strong> will be used: in <a href="https://github.com/tonytomov/jqGrid/blob/v4.1.2/js/grid.common.js#L354" target="_blank">the line 354</a>&#160;of the <em>grid.common.js</em> it will be used inside of <strong>success</strong> handler of <strong>$.ajax</strong> and in the <a href="https://github.com/tonytomov/jqGrid/blob/v4.1.2/js/grid.custom.js#L324" target="_blank">line 324</a> of the <em>grid.custom.js</em> inside of <strong>complete</strong> handler&#160;of&#160;<strong>$.ajax</strong>. It follows to the problem that the the paramer of the buildSelect function can be either the data from the server response converted corresponding to the <em>Content-Type</em>&#160;of the HTTP header and the <strong>dataType</strong> parameter. So the parameter can be either a string or object/array depend on the contain of the HTML/JSON response. It can be additionally an object where <strong>responseText</strong> property contains the main data. So to make the program working one have to test the type and the property of the input parameter before the data could be processed.</p>
<p><a href="http://stackoverflow.com/questions/6873242/confused-about-jquery-handling-of-my-data" target="_blank">The answer</a> described one from the problems.</p>
<p>Additional problem in the current code of <em>grid.custom.js</em>&#160;is that the buildSelect will be called also in case of the error response from the server. In the case the input data has absolutely another format. So&#160;I suggest to change the code of <em>grid.custom.js</em>&#160;so that one uses <strong>success</strong>&#160;handler of&#160;<strong>$.ajax</strong>&#160;like it is already in the <em>grid.common.js</em>.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Sat, 06 Aug 2011 18:27:21 +0300</pubDate>
        </item>
</channel>
</rss>