Hello,
I am trying to return the entire pqgrid model string including the data using an ajax call and populate the grid.
If i return the same string using sphageti code, it is showing the grid. With Ajax it is not showing.
Where could I have gone wrong?
Sphagetti code:
var data = <%= bindgrid2() %>;
//alert(data);
var obj=eval('(' + data + ')');
$grid1=$("#grid_json1").pqGrid(obj);
Ajax Call:
$.ajax({
type: "POST",
url: "F1845.aspx/bindGrid2",
data: "{}",
processData: false,
contentType: "application/json",
dataType: "json",
cache: false,
async: true,
success: function (msg) {
var xyz = eval(msg.d);
//$("#Text6").val(xyz);
var obj = eval('(' + xyz + ')');
//alert(obj);
$grid1 = $("#grid_json").pqGrid(obj);
alert("3");
//$("#grid_json").pqGrid("refreshDataAndView");
//alert("4");
},
error: function (x, e) {
alert("The call to the server side failed. " + x.responseText);
}
});
alert("3") is not fired in ajax. All alerts before it get fired. I compared the two strings that are returned from the server and they are matching exactly.
Your help will be appreciated.
Thanks,
SVK