July 10th, 2011
You must be logged in to post Login Register

Search Forums:


all usage of buildSelect should be inside of $.ajax.success






posts 1210

Hallo Tony,

in the jqGrid version 4.1.2 there are two places where buildSelect will be used: in the line 354 of the grid.common.js it will be used inside of success handler of $.ajax and in the line 324 of the grid.custom.js inside of complete handler of $.ajax. 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 Content-Type of the HTTP header and the dataType 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 responseText 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.

The answer described one from the problems.

Additional problem in the current code of grid.custom.js 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 I suggest to change the code of grid.custom.js so that one uses success handler of $.ajax like it is already in the grid.common.js.

Best regards



Sofia, Bulgaria


posts 7383



For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site – – by the very same guys that created jqGrid.

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:


Currently Online:

48 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 10276

Posts: 30365


There are 11039 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1210

markw65 – 179

kobruleht – 144

phicarre – 132

YamilBracho – 124

Renso – 118

Administrators: admin (60 Posts)

Moderators: tony (7383 Posts), Rumen[Trirand] (81 Posts)

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information