Submit Add/Edit form after preventDefault

4 posts, 0 answers
  1. Oliver
    Oliver avatar
    6 posts
    Member since:
    Sep 2014

    Posted 10 May Link to this post

    Hi,

    I am currently calling e.preventDefault(); on the click of the Update button in the Add/Edit popup of the grid.

    This prevents the closing and saving and thus allows me to perform an AJAX call to the server for additional validation. However, I don't know how I can execute the default action of the Update button after my verification was successful.

    Any hints?

  2. Oliver
    Oliver avatar
    6 posts
    Member since:
    Sep 2014

    Posted 10 May in reply to Oliver Link to this post

    Hm, more tests show that the preventDefault isn't actually working.

    So, I would need a solution how to perform this task:

    On clicking Update, an AJAX request is sent to the server. Depending on the results, the data is saved or a second popup is shown and the data is saved after the popup has been closed.

  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Oliver
    Oliver avatar
    6 posts
    Member since:
    Sep 2014

    Posted 10 May in reply to Oliver Link to this post

    Hm, more tests show that the preventDefault isn't actually working.

    So, I would need a solution how to perform this task:

    On clicking Update, an AJAX request is sent to the server. Depending on the results, the data is saved or a second popup is shown and the data is saved after the popup has been closed.

  5. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1493 posts

    Posted 11 May Link to this post

    Hi Oliver,

    You can try to edit the row and then save it.

    Regards,
    Danail Vasilev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready