Before sending changes to server, I am calling grid.isValid function to check if no validation errors exist.
How can i get summary of all errors if grid is not valid, so I can display the list to users?
if (isDirty) {
//validate the new added rows.
var addList = grid.getChanges().addList;
for (var i = 0; i < addList.length; i++) {
var rowData = addList;
var isValid = grid.isValid({ "rowData": rowData }).valid;
if (!isValid) {
alert("Newly added data not valid");
}
}
var changes = grid.getChanges({ format: "byVal" });
//post changes to server
$.ajax({
dataType: "json",
type: "POST",
.....