Hello.
This ajax code return error.
CODE :
$.ajax({
url: "/Factoring/Factoring/GetCommonDailySum",
dataType: 'json',
type: 'post',
contentType: "application/json; charset=UTF-8",
data: JSON.stringify(parameters),
beforeSend: function () {
targetGrid.jqxGrid('clear');
targetGrid.jqxGrid('showloadelement');
},
success: function(data) {
// initailize grid
if (data.succese == false) {
alert(data.message);
} else {
dataAdapter.localdata = data.ReturnValue;
targetGrid.jqxGrid('source').dataBind(); //this line will make error.
//targetGrid.jqxGrid({'source': gridData});
}
targetGrid.jqxGrid('hideloadelement');
}, // success
error: function(json, textStatus, errorThrown) {
}
});
Error message in chrome debug :
Uncaught TypeError: Cannot read property 'length' of undefined
at i.jqx.dataAdapter.dataBind (jqx-all-3.8.0.js:7)
at eval (eval at success (contents_1_1.js?dummy=20171017:133), <anonymous>:1:30)
at Object.success (contents_1_1.js?dummy=20171017:133)
at j (jquery-2.1.1.min.js:2)
at Object.fireWith [as resolveWith] (jquery-2.1.1.min.js:2)
at x (jquery-2.1.1.min.js:4)
at XMLHttpRequest.<anonymous> (jquery-2.1.1.min.js:4)
Is there any solution to solve this error?