Skip to main content
Tab

ASPxListBox.ItemDeleting Event

Enables you to prevent a list item from being deleted.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public event ASPxDataDeletingEventHandler ItemDeleting

Event Data

The ItemDeleting event's data class is ASPxDataDeletingEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
Keys Gets a dictionary of field name/value pairs that represent the primary key of the row to delete.
Values Gets a dictionary of the non-key field name/value pairs for the row to delete.

Remarks

A list box editor’s list items can be deleted by using the server (ListEditItemCollection.Remove, StateManagedCollectionBase.Clear or client (ASPxClientListBox.RemoveItem, ASPxClientListBox.ClearItems) methods. Each time a list item is going to be deleted from the editor’s ASPxListEdit.Items collection, the ItemDeleting event occurs, allowing you to cancel item deletion. To cancel the delete operation, set the event parameter’s Cancel property to true.

After a list item has been deleted, the ASPxAutoCompleteBoxBase.ItemDeleted event is raised.

See Also