This is a migrated thread and some comments may be shown as answers.

Submit Add/Edit form after preventDefault

3 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 10 May 2016, 06:40 AM

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?

3 Answers, 1 is accepted

Sort by
0
Oliver
Top achievements
Rank 1
answered on 10 May 2016, 06:48 AM

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.

0
Oliver
Top achievements
Rank 1
answered on 10 May 2016, 07:10 AM

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.

0
Danail Vasilev
Telerik team
answered on 11 May 2016, 01:52 PM
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
Tags
Grid
Asked by
Oliver
Top achievements
Rank 1
Answers by
Oliver
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or