hi ,
I am using Kendo datasource transport read method in the read i am calling POST API but the API is getting called multiple times and also when the complete callback is called the API is infinitely called can you please give me the solution for this
Here is my transport function
var transportFunction = function(pageurl, reqObject) {
return {
read: {
url: pageurl,
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "json",
beforeSend: function(xhr) {
xhr.setRequestHeader('Authorization', token);
}
},
parameterMap: function(options) {
reqObject.PageSize = options.pageSize;
reqObject.PageNum = options.page;
var request = JSON.stringify(reqObject);
return request;
}
}
}
and we are calling as below:
vm.gridOptions.dataSource.transport=transportFunction(apiUrl, reqObj);
vm.gridOptions.dataSource.schema.data="docDetailsArray"
vm.gridOptions.dataSource.schema.total="totalCount"
response from server:
{
demoDetails:[],
ErrorMsg:[],
Success: true,
docDetailsArray:[
{list_of_keys_with_value1},
{list_of_keys_with_value2},
.....
.....
]
};
Anyone face the same issue. can any body help me out why multiple xhr reqest are going
Thanks