Implementing the Popup editing in this way:
$("#gridAddresses").kendoGrid({
dataSource: {
type: "json",
transport: {
read: {url:'api/AddressInfo?type=customer&id=' + idEntity, type:'GET'},
update: {url:'api/AddressInfo', type:'PUT'},
destroy:{url:'api/AddressInfo',type:'DELETE'},
create: {url:'api/AddressInfo?idCustomer=' + idEntity, type:'POST'}
},
pageSize: 3,
batch:false,
schema: {
model: {
id: "idAddressInfo",
fields: {
idAddressInfo: { editable: false },
Description: {type:"string" },
Address: {type:"string" },
City: { type:"string"},
State: { type:"string"} ,
ZipCode: { type:"string"}
}
}
}
},
toolbar: [{name:"create",text:"",width:20}],
columns: [
{ field:"Description", title: "Description", width: "180px" },
{ field:"Address", title: "Address", width: "200px" },
{ field: "City", title:"City", width: "150px" },
{ field: "State", title:"State", width: "90px" },
{ field: "ZipCode", title:"Zip", width: "60px" },
{ command: [{name:"edit",text:"",width:20}, {name:"destroy",text:"",width:20}], title: " ", width: "150px" }],
editable:{
mode: "popup"
}
});
Clicking in "Create" button a void "Edit" popup is shown (not a "Create" popup as I axpected)...
Clicking the "Update" on the popup dialog the PUT method is invoked instead PUSH... so the server persisting procedure fails.
What is the problem?
$("#gridAddresses").kendoGrid({
dataSource: {
type: "json",
transport: {
read: {url:'api/AddressInfo?type=customer&id=' + idEntity, type:'GET'},
update: {url:'api/AddressInfo', type:'PUT'},
destroy:{url:'api/AddressInfo',type:'DELETE'},
create: {url:'api/AddressInfo?idCustomer=' + idEntity, type:'POST'}
},
pageSize: 3,
batch:false,
schema: {
model: {
id: "idAddressInfo",
fields: {
idAddressInfo: { editable: false },
Description: {type:"string" },
Address: {type:"string" },
City: { type:"string"},
State: { type:"string"} ,
ZipCode: { type:"string"}
}
}
}
},
toolbar: [{name:"create",text:"",width:20}],
columns: [
{ field:"Description", title: "Description", width: "180px" },
{ field:"Address", title: "Address", width: "200px" },
{ field: "City", title:"City", width: "150px" },
{ field: "State", title:"State", width: "90px" },
{ field: "ZipCode", title:"Zip", width: "60px" },
{ command: [{name:"edit",text:"",width:20}, {name:"destroy",text:"",width:20}], title: " ", width: "150px" }],
editable:{
mode: "popup"
}
});
Clicking the "Update" on the popup dialog the PUT method is invoked instead PUSH... so the server persisting procedure fails.
What is the problem?