This example demonstrates how you can perform some server-side actions when a user clicks the "Delete" command button, and then show the Deleting confirmation PopupControl.
Use a custom command button to create a custom Delete link. Handle the server-side ASPxGridView.CustomButtonCallback event to perform server-side actions when the Delete button is clicked. Use ASPxGridView.JSProperties to pass values from the server side to the client. I have used the "cpShowDeleteConfirmBox" JSPropety to indicate if it is necessary to show the confirmation popup on the client when the grid's callback ends. The "cpRowIndex" JSProperty is used to pass the deleting row index from the server-side ASPxGridView.CustomButtonCallback event handler to the client.
The ASPxGridView.RowDeleting event is used for custom row deleting. It is not necessary to handle it if you are using the standard DataSourse deleting functionality.
Question Comments
Added By: Dik Helleman at: 1/28/2013 1:48:34 AM
Hi,
Thank you for this example.
Can you tell me how I can hide/show controls on the popup (for example an aspxLabel) depending on values which are retrieved in de custombuttoncallback-function serverside?
Thanks,
Dik Helleman
The Netherlands
Hi Dik,
I have extracted it to a separate ticket created on your behalf: Q377913 (How to show the Deleting Confirmation box after performing some server-side actions).