Inline editting validation errors not stopping grid from updating

5 posts, 0 answers
  1. Pat
    Pat avatar
    58 posts
    Member since:
    Feb 2005

    Posted 14 Dec 2012 Link to this post

    I followed the ajax editting docs and I have server side validation error correctly getting displayed.  But the grid action still completes and the grid reverts back to view mode instead of staying in edit mode so I can correct the errors.

    How do I get the grid to not update itself?
  2. Daniel
    Admin
    Daniel avatar
    2177 posts

    Posted 18 Dec 2012 Link to this post

    Hello,

    This is not supported out of the box but can be achieved with the approach suggested in this code-library.

    Regards,
    Daniel
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Pat
    Pat avatar
    58 posts
    Member since:
    Feb 2005

    Posted 18 Dec 2012 Link to this post

    Thanks.  I had originally tried what was in that example, but it didn't work for me.  So I tried it again, and this time it worked.

    What I did was just add this

    var grid = $("#Grid").data("kendoGrid");
               grid.one("dataBinding", function (e) {
                   e.preventDefault();   // cancel grid rebind if error occurs                                             
               });

    to my error function.  You should consider updating your mvc docs to include this snippet in that function.
  4. Terrina
    Terrina avatar
    11 posts
    Member since:
    Mar 2013

    Posted 28 Apr Link to this post

    I want to see this solution, however, I don't have VS 2010 and can't open the solution. Is it available in 2013?
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1968 posts

    Posted 02 May Link to this post

    Hello,

    When you try to open the solution with VS 2013 it will ask you to make changes to the project file in order to include all new features introduced in this version of VS and make it available with this project. This is a MVC 3 project and it might need to update to MVC 4 or later. The following command will help you to do that. Also a reference to the Kendo.MVC.dll for .NET 4.0 will be required. Please refer to the Distribution Contents article to find the proper assembly version. 

    Regards,
    Boyan Dimitrov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top