I managed to change the endpoint of kendoGrid.dataSource.transport.options.create.url and redirect it into a different endpoint
is there a way to change the e.response and e.type in this code? code bellow. I was talking about the parameter of the callback of requestEnd
requestEnd: function (e) {
var response = e.response;
var type = e.type;
console.log(e, 'I am event');
console.log("i triggered again and i am response", response);
console.log("i am type", type);
return 0;
if (type !== "read") {
toastr.options = {
positionClass: "toast-top-right"
};
if (type === 'update') {
if (!response.success) {
toastr.error(response.errorMessage, 'Account Update');
} else {
toastr.info('Acount detail successfully updated', 'Account Update');
}
} else if (type === 'create') {
if (!response.success) {
toastr.error(response.errorMessage, 'Message');
} else {
toastr.info('New Account successfully added', 'Message');
}
}
$('#grid').data('kendoGrid').dataSource.read();
$('#grid').data('kendoGrid').refresh();
}
},
I really appreciate your help! anyone that could help me should deserve a raise :)