I have a kendo MVC grid in a page.in that page i have button. when i click button i want to open a kendowindow popup.
so here is my issue.
when i am clicking that button am saving grid values and i am opening kendo window popup. so if i have a errors in grid then i dont want to open kendo window popup. how to achieve this. below is my button click code.
$("#btnAddProject").click(function (e) {
        var grid = $("#Grid").data("kendoGrid");
        grid.saveChanges();
        var myWindow = $("#AddProjectWindow");
        myWindow.data("kendoWindow").open();
        myWindow.data("kendoWindow").center();
    });
Here am included below datasource events. events.Error("error_handler").RequestEnd("gridRequestEnd")
but these datasources functions are calling after click event finish. but i want wait for grid.saveChanges() to finish and check whether save is success or fail. if fail i dont want to open kendo popup. here datasource functions are calling after finishing button click function