Hi,
my requirement is that if IsDuplicate value is true then don't allow user to call update function.
in above url i update edit functionality code like below
edit: function (e) {
var updateButton = $(".k-grid-update")[0];
var grid = this;
$(updateButton).on("click", function (e) {
var IsDuplicate;
var dataItem = grid.dataItem(grid.editable.element[0]);
$.ajax({
type: "POST",
url: "/Home/CheckStatus",
data: JSON.stringify(dataItem),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
//if (data.Isvalid==true)
IsDuplicate = data.Isvalid;
}
});
//if check status is true then don't call update function
})
}
can you please help me