ListView.OnItemEditing(ListViewEditEventArgs) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Raises the ItemEditing event.
protected:
virtual void OnItemEditing(System::Web::UI::WebControls::ListViewEditEventArgs ^ e);
protected virtual void OnItemEditing(System.Web.UI.WebControls.ListViewEditEventArgs e);
abstract member OnItemEditing : System.Web.UI.WebControls.ListViewEditEventArgs -> unit
override this.OnItemEditing : System.Web.UI.WebControls.ListViewEditEventArgs -> unit
Protected Overridable Sub OnItemEditing (e As ListViewEditEventArgs)
The event data.
The ListView control is not bound to a data source control by using the DataSourceID property.
The ItemEditing event is raised when an item's Edit button is clicked, but before the ListView control enters edit mode. (An Edit button is a button control whose CommandName property is set to "Edit".) This enables you to perform a custom routine whenever this event occurs, such as canceling the edit operation.
Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.
The OnItemEditing 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.
When you override OnItemEditing(ListViewEditEventArgs) in a derived class, call the base class's OnItemEditing(ListViewEditEventArgs) method so that registered delegates receive the event.
Product | Versions |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: