Attached is some code that I have been trying to get to work. In the gridview9 I was allowing the user to delete a row with the simple delete command link in the first column and that was working. Now, the user wants the ability enter a notes field and then get a confirmation to delete the row. So, what I did was I added a new link which is an EDIT but I renamed it to be 'DELETE/Edit" for now during development. Eventually if this method works I will remove the current DELETE and rename the DELETE/Edit to Delete.
I was thinking I would trigger the editform to popup allow the user to enter the notes field then when they click the Delete button I would then show the popupcontrol, etc...
The issues I have are:
1) on the popupcontrol (popupDeleteCheckPayment) if the user clicks OK, I want to close the popupcontrol, delete the row and refresh the grid going back to the gridview9 data which should also close the editform down.
2) I have added the @Note to my delete stored procedure so how and where do I add that value to the delete when I am ready to delete the row after confirmation? Right now I get 'procedure or function spDeleteCheckPaymentFromInvoice expects parameter @Note which was not supplied.
Thank you for contacting us.
We need some time to examine the provided page and analyze the implemented scenario. We will contact you once we have any results.
Usually, we avoid discussing multiple questions within the same thread because this makes it difficult to track the entire conversation. Therefore, I have moved your second question to a separate thread: ASPxGridView - How to add a row field value to Stored Procedure parametes
It is not quite easy to give you a precise answer without the capability to run and trace your page, which appears to be rather complex and contains a number of nested grids.
Trying to answer your first question, assuming that the problem is in closing the popup EditForm, it seems that you can call the grid's server CancelEdit method in the ASPxGridView9_RowDeleting event handler.
Note that we have the following CodeCentral examples that relate to the "delete confirmation" functionality and might be helpful in our scenario:
- How to implement a delete confirm dialog with a "don't ask me again" option
- How to include a deleted row KeyField value into the delete confirmation dialog
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.