現在の操作は、「作成」または「更新」であるとユーザーに警告するエラーがないかどうかをチェックするためにデータソースのrequestEndイベントを使用することができます。ここ
サンプルMVCラッパー
@(Html.Kendo().Grid<ProductViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.ProductName).Title("Product Name");
columns.Bound(p => p.UnitPrice).Title("Unit Price");
columns.Bound(p => p.UnitsInStock).Title("Units In Stock");
})
.Pageable()
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
// below is the RequestEnd event handler
.Events(events => events.RequestEnd("onRequestEnd"))
.Read(read => read.Action("Products_Read", "Grid"))
)
)
とは、イベントハンドラ
function onRequestEnd(e) {
if (e.type == "update" && !e.response.Errors) {
// Update record is successfull, show your desired message
}
if (e.type == "create" && !e.response.Errors) {
// Create record is successfull, show your desired message
}
}
です