I have a grid with inline editing. Each row has few required fields - text boxes, drop downs e.t.c.
When I click on edit button the row turns to in "edit" mode. Validation is working as expected, especially if I click on "update" button.
Here is a situation. I have another custom command button "Confirm" which call javascript function onItemConfirm
columns: [
{
command: [{ name: "edit", text: { edit: " ", update: " ", cancel: " " } },
{ name: "confirmButton", text: " ", template: "<a class='k-button k-grid-confirmButton' onclick ='onItemConfirm(this)'><span class='k-icon k-i-checkbox'></span></a>" },
], title: "Edit / Confirm", width: "120px", locked: true
}
function onItemConfirm(e) {
var row = $(e).closest("tr"),
grid = gridElement.data("kendoGrid"),
model = grid.dataItem(row);
// validate
if(model.Field! == "" || model.Field1 == null){
grid.editRow(row);
// I need to display validation messages
}
}
By my design it should turn a row into "edit" mode, which is does, but then I want to display validation messages (tool tips) for columns with invalid data immediately without forcing user to click on Update button. Is it possible?
thanks