justinmind-logo
 
Upvote 2

Add a "Yes/No" confirmation dialog box when deleting an Item from a Data Grid control

Answered Victor Conesa 11 years ago

How do I add a "Yes/No" Dialog Box when I click delete on a data item in a Data Grid contol. If the user click "No" in the Dialog Box then I would like to cancel the delete action...

Replies (4)
photo
1

Check out this tutorial and, instead of the data master function 'modify' use the one called 'delete'

photo
1

Is there a way to add a pop-up confirmation like orginal question without going to a new page?


I would like to use this video and have a pop-up show that when they click on Yes, it deletes the selected row. For some reason, it's deleting the entire data grid and not just the row.

photo
1

Hi Rich,


Your inquiry has been answered through our Customer Support Portal.


Best,


Sonia Durán

photo
1

Please can you tell us how this is done? I would also like to add a confirmation pop-up dialog, when deleting a data list row.

photo
photo
1

Gabriel, Rich and Peter, did you manage to solve this?

I am attempting this as per Victor's comment and it is not doing it for me :(

And Sonia's answer takes me to a generic page with events and Interactions scenarios.

photo
1

Doesn't help me one bit Danielle unfortunately :(

This is about adding a row to a data list. What I need is a confirmation button when a user wants to delete a row from the data list. I can do the buttton, I can do the deleting. What I can't do is link the two.

photo
1

What do you mean by 'link the two' in this case?

photo
1

I mean that I can create a datalist, I can add a column to delete this or that row, and I can add a datalist-event to actually delete that row - please see deleteElementsDataListConfirmation.JPG

I can also create a confirmation message - please see deleteElementsDataList.JPG


But what I want to do is, user clicks on "delete" on a particular row and sees the pop message asking him to confirm if he does want to delete it. Only when the user confirms he does want to delete it, would the data entry actually be deleted.

photo
2

Thanks for the info - I see what you are looking for now. Check out the attached example. Here's what it does:

For the delete text:

  1. Created an "On Click" + "Show" event that shows a confirmation dialog.
  2. Created an "On Click " + "Set Value" event that gives the confirmation dialog the value of the Current_Row (clicked row), so you'll know which row you've selected.
  3. Created a Variable that stores the value of the clicked row. Then, we added an "On Click " + "Set Value" event that gives the variable the value of the clicked row.

For the confirmation dialog:

  1. On the 'Yes' button, created an "On Click " + "Data Master Action - delete" event that uses the Variable's value (which is storing Current_Row_1) as the value to delete.
  2. On the 'Cancel' button, "On Click" + "Hide", hiding the dialog.

Let me know if you have any questions.

photo
Leave a Comment
 
Attach a file