jqxGrid请求异常处理
彭俊智
2023-12-01
function initOurDefData(){
window.missionType = getQueryParam("missionType");
var url = "";//请求地址
var source =
{
dataType: "json",
type: "post",
dataFields: [
{ name: 'id', type: 'string' },
...
{ name: 'bizF20', type: 'string' }
],
url: url,
loadError: function(xhr,status,error){ //异常处理
},
beforeprocessing: function (data) {
source.totalrecords = data.total;//数据条数
}
};
var dataAdapter = new $.jqx.dataAdapter(source,
{
formatData: function (data) {
return data;
}
});//数据适配器