ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to call custom delete POST method on delete button click in grid
Title:
B
I
{code}
?
I am having a Home Controller with Index view and Create view. In Index view, I have a grid showing list of users In Create view, I enter user details, but there is also a grid inside this view with inline editing. Both grid have delete button. But the problem is the logic of deletion is different for both grids. I cannot call same DELETE POST action for both grids. So, I want to keep two custom delete POST actions in my home controller. How is this possible, please help ?
Save Changes
Cancel
SalesARM
asked at 27 Dec 2019
Answers
B
I
{code}
?
I assume you're using the `InitCrudPopupsForGrid` custom helper copied from our demo, have a look inside this helper and you'll notice the `InitPopupForm` helper for the delete action, you should be good from here
Save Changes
Cancel
Omu
answered at 28 Dec 2019
I understand you are talking about this line inside InitPopupForm .Url(url.Action("Delete", crudController, new { area })) I can use my custom method, If I change here the method name in place of "Delete". But I believe this will change the default calling of the delete action everywhere. I want to keep this as it is except only at one place I want to call a separate method when clicking on OK button (inside delete popup form) i.e. DELETE POST method.
at 28 Dec 2019
SalesARM
Any update, I'am still looking for some alternative you can provide ??
at 30 Dec 2019
SalesARM
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK