I'm having a problem with deleting records from a simple list with only one field. The UI works fine and deletes the record however the destroy call as defined in my datasources is not being called. Here is the code.
Does the ID as defined in my model's schema have to be an integer or are strings acceptable?
var
ds =
new
kendo.data.DataSource({
transport: {
read: {
url:
"/api/admin/users/someUser/roles"
,
dataType:
"json"
},
destroy: {
type:
"DELETE"
,
url:
"/api/admin/users/someUser/roles"
,
dataType:
"json"
}
},
schema: {
model: {
id:
"roleName"
,
fields: {
roleName: { editable:
false
}
}
}
}
});
$grid.kendoGrid({
dataSource: ds,
editable:
true
,
columns: [
{ field:
'roleName'
, title:
'Role'
},
{ command: [
'destroy'
], title:
' '
, width:
'120px'
}
]
});
Does the ID as defined in my model's schema have to be an integer or are strings acceptable?