DataGridView::SelectionChanged Event
.NET Framework (current version)
Occurs when the current selection changes.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
This event occurs whenever cells are selected or the selection is canceled, whether programmatically or by user action. For example, this event is useful when you want display the sum of the currently selected cells.
When you change the value of the CurrentCell property, the SelectionChanged event occurs before the CurrentCellChanged event. Any SelectionChanged event handler accessing the CurrentCell property at this time will get its previous value.
For more information about handling events, see NIB: Consuming Events.
.NET Framework
Available since 2.0
Available since 2.0
Show: