Update:
Digging through the code, it seems that the settings.transport is being ignored in the code. I am looking at Kendo.web.js line 6171. Here the following is false:
transport.options.update == transport["update"]
Where "transport.options.update" is my function and "transport["update"]" is the default RemoteTransport Update method. So when the code below it fires, it calls the default and not mine. Is this a bug, or am I doing something wrong?
Maybe I have a dirty eye, but I don't see why this is not working:
var settings =
{
dataSource:
{
transport:
{
read: apiUrl,
update: function (e)
{
// Nothing, happens, this is never called
console.log("Hello?");
debugger;
alert('update');
}
}
}
}
but this DOES work:
var settings =
{
dataSource:
{
transport:
{
read: apiUrl,
update:
{
url: editApiUrl,
type: "POST",
data: function (e)
{
debugger;
alert('works');
}
}
}
}
}
I am copying the first sample from here:
Digging through the code, it seems that the settings.transport is being ignored in the code. I am looking at Kendo.web.js line 6171. Here the following is false:
transport.options.update == transport["update"]
Where "transport.options.update" is my function and "transport["update"]" is the default RemoteTransport Update method. So when the code below it fires, it calls the default and not mine. Is this a bug, or am I doing something wrong?
Maybe I have a dirty eye, but I don't see why this is not working:
var settings =
{
dataSource:
{
transport:
{
read: apiUrl,
update: function (e)
{
// Nothing, happens, this is never called
console.log("Hello?");
debugger;
alert('update');
}
}
}
}
but this DOES work:
var settings =
{
dataSource:
{
transport:
{
read: apiUrl,
update:
{
url: editApiUrl,
type: "POST",
data: function (e)
{
debugger;
alert('works');
}
}
}
}
}
I am copying the first sample from here:
var dataSource = new kendo.data.DataSource({
transport: {
update: function(options) {
// make AJAX request to the remote service
$.ajax( {
url: "/orders/update",
data: options.data, // the "data" field contains paging, sorting, filtering and grouping data
success: function(result) {
// notify the DataSource that the operation is complete
options.success(result);
}
});
}
}
});