How to determine if there was validation errors after calling grid.SaveChanges in javascript

2 posts, 0 answers
  1. horo
    horo avatar
    2 posts
    Member since:
    Feb 2007

    Posted 02 May 2013 Link to this post

    Hi to All,

    I call grid.SaveChanges in a javascript function. My problem is if there was some _client_ side validation errors for example invalid date format, then I must not execute some DOM operations. Unfortunately grid.SaveChanges() hase no return value and searching for keyword 'valid' in grid documentation page has no result.

    Thx in advance
    Horo
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 06 May 2013 Link to this post

    Hello Horo,

    You can invoke the validator manually with the following piece of code and check the result:

    var result = $('#gridName').data().kendoGrid.editable.validatable.validate();


    Kind regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top