Hi Param Query team,
I was trying to pass data from querygrid to backend i.e. remote location.
The issue is that I have a checkbox column in my grid, If i do not click on any checkbox at that time I am able to pass the data to remote location i.e. server side component.
But if I click on any checkbox and then try to pass the data from the grid, at that time it is not passing the data to server side component.
It shows the status as parser error and the error syntax is Unexpected Token <
in the alert box.
Here it is the code snippet i.e. the ajax call to pass the data from querygrid to server side..
function acceptChanges() {
alert("hi");
var DM = $("#grid_json").pqGrid("option", "dataModel");
var data = DM.data;
/* $.each(data, function(key, item) {
alert("test..."+item);
}); */
$.ajax({
dataType : "json",
//url: "/pro/products.php", //for PHP
contentType : "application/json; charset=utf-8", //for ASP.NET
type : "POST",
async : true,
url : "getJsonValue", //for ASP.NET
data : JSON.stringify(data), //for ASP.NET
//data: { "updateList": JSON.stringify(updateList) },//for PHP
mimeType : 'application/json',
success : function(rows) {
//debugger;
alert("test...");
$("#grid_json").pqGrid("commit", {
type : 'update',
rows : rows
});
},
error : function(data, status, er) {
alert("error 565: " + " status: "
+ status + " er:" + er);
},
complete : function() {
alert("test 2...");
$("#grid_json").pqGrid("hideLoading");
$("#grid_json").pqGrid("rollback", {
type : 'update'
});
}
});
Please provide me any solution to overcome from this issue.