1
votes

I've a Kendo grid with editable = incell and more than one required text field. The default values are empty strings. When I click on "Add new record" the first required field is marked as error because it's empty. I can only leave the field after I've done some input. Although the other required fields are still empty I can leave the row. How can I prevent that a row can't be left without filling all required fields?

1
Can you show you Kendo UI Grid definition? - Husein Roncevic

1 Answers

1
votes

Try this,

 $('.k-grid-save-changes').on("click", function () {
            var grid = $("#grid").data("kendoGrid");
            if (grid.editable && !grid.editable.validatable.validate()) {
                //What ever you want to do
                e.preventDefault();
                return false;
            }
       });