System.Windows.Forms.ListView.AfterLabelEdit Event

Occurs when the label for an item is edited by the user.

Syntax

public event LabelEditEventHandler AfterLabelEdit

Remarks

The ListView.AfterLabelEdit event occurs when the user finishes modifying the text for an item. The new string that the user types for the item is passed to the event, and the event handler can reject the change. If the event handler rejects the change, the text reverts to the text as it was before the user began editing the item.

Note:

Because the ListView.AfterLabelEdit event takes place before the label edit is committed, calling the ListView.Sort method in a handler for this event will sort the item using the original value.

In order for the ListView.AfterLabelEdit event to be raised, the ListView.LabelEdit property of the System.Windows.Forms.ListView control must be set to true.

You can create an event handler for the ListView.BeforeLabelEdit event to perform tasks before the user edits the text of an item.

For more information about handling events, see Consuming Events.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0