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.
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.