Hi Team,
Apologies for delay!!
I’m usnig Guriddo_jqGrid_JS_5.0.2
Kind Regards, NM1988
Hi Team,
I’ve tried the console.log(response) and alert(response) in buildSelect but it doesn’t give any popup.
Kind Regards,
NM1988
Hi Team,
I’ve found the issue, that is due to HttpHandler and corrected the same. Now, i’ve changed my webmethod to return ‘List<Dictionary<string, object>>’ and the below code
ajaxSelectOptions: { type: ‘POST’,
contentType: ‘application/json; charset=utf-8’,
datatype: ‘json’,
success: function (result) {
alert(JSON.stringify(result));
}
}
Alert is showing as below
{“d”:[{“ID”:1,”Name”:”Test1″},{“ID”:2,”Name”:”Test2″}]}
but, buildSelect is not getting hit ,
dataUrl: “Data.aspx/BindDDInfo”,
buildSelect: function (response) {
var data = typeof response === “string” ? JSON.stringify(response) : response,
s = “<select>”;
s += ‘<option value=”0″>–Select–</option>’;
$.each(data, function () {
s += ‘<option value=”‘ + this.ID + ‘”>’ + this.Name + ‘</option>’;
});
return s + “</select>”;
}
Could you please have an idea on this.
Hi Team,
I’ve tried the option (error) but nothing resulted. I’ve <span class=”comment-copy”> found something interesting…. i gave ‘Data.aspx/Bind’ for dataUrl where there is no webmethod ‘Bind’ exists in codebehind (in Data.aspx.cs) but still ResponseHeader stating HTTP/1.1 200 OK and understood that Responsebody filled with Data.aspx (even with BindDDInfo). So, any issues with Jqgrid version?</span>
BindDDInfo is webmethod in codebehind (in Data.aspx). I’ll try the mentioned one and will let you know the status.
Kind regards,
NM1988
Thanks Team for your response.
checked through F12 (in IE9), could see Response Header as below
<span class=”typ”>Response</span><span class=”pln”> HTTP</span><span class=”pun”>/</span><span class=”lit”>1.1</span> <span class=”lit”>200</span><span class=”pln”> OK
</span><span class=”typ”>Server</span><span class=”pln”> ASP</span><span class=”pun”>.</span><span class=”pln”>NET </span><span class=”typ”>Development</span> <span class=”typ”>Server</span><span class=”pun”>/</span><span class=”lit”>10.0</span><span class=”pun”>.</span><span class=”lit”>0.0</span>
<span class=”typ”>Date</span> <span class=”typ”>Wed</span><span class=”pun”>,</span> <span class=”lit”>24</span> <span class=”typ”>Feb</span> <span class=”lit”>2016</span> <span class=”lit”>15</span><span class=”pun”>:</span><span class=”lit”>07</span><span class=”pun”>:</span><span class=”lit”>16</span><span class=”pln”> GMT
X</span><span class=”pun”>-</span><span class=”typ”>AspNet</span><span class=”pun”>-</span><span class=”typ”>Version</span> <span class=”lit”>4.0</span><span class=”pun”>.</span><span class=”lit”>30319</span>
<span class=”typ”>Cache</span><span class=”pun”>-</span><span class=”typ”>Control</span> <span class=”kwd”>no</span><span class=”pun”>-</span><span class=”pln”>cache</span><span class=”pun”>,</span> <span class=”kwd”>no</span><span class=”pun”>-</span><span class=”pln”>store
</span><span class=”typ”>Pragma</span> <span class=”kwd”>no</span><span class=”pun”>-</span><span class=”pln”>cache
</span><span class=”typ”>Expires</span> <span class=”pun”>-</span><span class=”lit”>1</span>
<span class=”typ”>Content</span><span class=”pun”>-</span><span class=”typ”>Type</span><span class=”pln”> text</span><span class=”pun”>/</span><span class=”pln”>html</span><span class=”pun”>;</span><span class=”pln”> charset</span><span class=”pun”>=</span><span class=”pln”>utf</span><span class=”pun”>-</span><span class=”lit”>8</span>
<span class=”typ”>Content</span><span class=”pun”>-</span><span class=”typ”>Length</span> <span class=”lit”>69186</span>
<span class=”typ”>Connection</span> <span class=”typ”>Close</span>
Response body returning data.aspx html page and not sure what went wrong.
I’ve added ajaxSelectOptions: { cache: false, type: ‘POST’ } — still not working.
Note: I’ve placed debug point in BindDDInfo function and it’s not getting hit from dataUrl but debug point got hit when i’ve mentioned same function in url (to pick data to jqgrid).
So, not sure what went wrong. Could you please have a look on this.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top