It fails because before setting the value it performs validation. If validation was successful then it will set the value on model.
Since the desired field has no value and validation rule will fail on that.
It should accept the value and then perform validation. If validation fails with new value then it might discard the changes.
$("#grid").kendoGrid({
dataSource: {
batch: true,
transport: {
read: function(e){
e.success([1,2,3,4,5,6,7,8,9].map(function(i){return {id: i, title: "test" + i}}));
}
},
schema: {
model: {
id: "id",
fields: {
id: {defaultValue: "-1"},
title: {
validation: {
required: true
}
}
}
}
}
},
columns: [
{field: "title", title: "Title", filterable: {field: "title.a"}},
{command: ["edit", {name: "destroy"}]}
],
editable: {mode: "inline"},
filterable: true,
toolbar: [{name: "create"}]
});
var grid = $("#grid").getKendoGrid();
var model = grid.dataItems()[0];
grid.editRow(model);
model.set('title', '');
model.set('title', 'test 1111'); // it will fail