Hello,
Kendo UI version:
http://cdn.kendostatic.com/2014.3.1119/js/kendo.all.min.js with
http://cdn.kendostatic.com/2014.3.1119/js/angular.min.js
OS:
Win7 64bit / Win8.1 64bit
exact browser version:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
jQuery version:
http://cdn.kendostatic.com/2014.3.1119/js/jquery.min.js
----------------------------------------------------
I have an interface to an ODATA-V4 service which supports CRUD.
Read is working fine, only updating of data causing troubles.
In code I set a dynamic update URL by a function.
Then I tried to send (via pressing SAVE button in Kendo grid toolbar) a update request to ODATA service but nothing happens.
I did some investigations (F12 tools) to the corresponding request packet and I found out that the packet is using the method "OPTIONS" instead of "PUT".
The JSON for the model is missing in attachment (parameters) of the request.
When I remove the URL statement from update statement then "PUT" is send but (of course) to the wrong address.
In this case the JSON for the model in attachment (parameters) of the request is available.
Do I something wrong and if not, is there any chance to fix it or to get a workaround?
Thanks, Stephan
Here is the complete datasource code:
Kendo UI version:
http://cdn.kendostatic.com/2014.3.1119/js/kendo.all.min.js with
http://cdn.kendostatic.com/2014.3.1119/js/angular.min.js
OS:
Win7 64bit / Win8.1 64bit
exact browser version:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
jQuery version:
http://cdn.kendostatic.com/2014.3.1119/js/jquery.min.js
----------------------------------------------------
I have an interface to an ODATA-V4 service which supports CRUD.
Read is working fine, only updating of data causing troubles.
In code I set a dynamic update URL by a function.
Then I tried to send (via pressing SAVE button in Kendo grid toolbar) a update request to ODATA service but nothing happens.
I did some investigations (F12 tools) to the corresponding request packet and I found out that the packet is using the method "OPTIONS" instead of "PUT".
The JSON for the model is missing in attachment (parameters) of the request.
When I remove the URL statement from update statement then "PUT" is send but (of course) to the wrong address.
In this case the JSON for the model in attachment (parameters) of the request is available.
Do I something wrong and if not, is there any chance to fix it or to get a workaround?
Thanks, Stephan
Here is the complete datasource code:
$scope.mainGrid = {
dataSource: {
type: "odata-v4",
transport: {
read: {
},
update: {
url: function (data) {
return "http://xxx.xxx.xxx.xxx/abc/odata/def/Areas(" + data.models[0]._Key + ")";
},
dataType: "json",
type: 'PUT'
},
create: {
},
parameterMap: function(options, operation) {
if (operation !== "read") {
return kendo.stringify(options);
}
},
},
schema: {
model: {
id: "_Key",
fields: {
AreaGlobalName: { type: "AreaGlobalName" },
_Key: { type: "_Key" }
}
},
},
batch:true,
pageSize: 5,
serverPaging: false,
serverSorting: false
},
......