Provides data for the ListView.BeforeLabelEdit and ListView.AfterLabelEdit events.
See Also: LabelEditEventArgs Members
A System.Windows.Forms.LabelEditEventArgs specifies the index and caption of a System.Windows.Forms.ListViewItem and the caption after it has been edited by the user. This class also provides a LabelEditEventArgs.CancelEdit property. You can use this property in a ListView.BeforeLabelEdit event handler to prevent the user from editing the label. You can also use it in an ListView.AfterLabelEdit event handler to revert the change, returning the label it to its original value. This is useful when you want to validate user input before committing the change.
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.