Επεξεργασία

Κοινή χρήση μέσω


ListView.OnItemDeleted(ListViewDeletedEventArgs) Method

Definition

Raises the ItemDeleted event.

protected:
 virtual void OnItemDeleted(System::Web::UI::WebControls::ListViewDeletedEventArgs ^ e);
protected virtual void OnItemDeleted (System.Web.UI.WebControls.ListViewDeletedEventArgs e);
abstract member OnItemDeleted : System.Web.UI.WebControls.ListViewDeletedEventArgs -> unit
override this.OnItemDeleted : System.Web.UI.WebControls.ListViewDeletedEventArgs -> unit
Protected Overridable Sub OnItemDeleted (e As ListViewDeletedEventArgs)

Parameters

e
ListViewDeletedEventArgs

The event data.

Remarks

The ItemDeleted event is raised when an item's Delete button is clicked or the DeleteItem method is called, after the ListView control deletes the item. (A Delete button is a button control whose CommandName property is set to "Delete".) This enables you to perform a custom routine whenever this event occurs, such as checking the results of the delete operation.

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnItemDeleted method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

When you override OnItemDeleted(ListViewDeletedEventArgs) in a derived class, call the base class's OnItemDeleted(ListViewDeletedEventArgs) method so that registered delegates receive the event.

Applies to

See also