SelectionChanging Event (GridModel)

Occurs before the model updates internal data structures when the model in the process of selecting a range of cells as a result of a GridModelSelections.SelectRange.
<DescriptionAttribute("Occurs before internal data structures are updated with new selection state from a SelectRange command.")>
Public Event SelectionChanging As GridSelectionChangingEventHandler
Dim instance As GridModel
Dim handler As GridSelectionChangingEventHandler
AddHandler instance.SelectionChanging, handler
[Description("Occurs before internal data structures are updated with new selection state from a SelectRange command.")]
public event GridSelectionChangingEventHandler SelectionChanging
Event Data

The event handler receives an argument of type GridSelectionChangingEventArgs containing data related to this event. The following GridSelectionChangingEventArgs properties provide information specific to this event.

(Inherited from System.ComponentModel.CancelEventArgs)
Gets the range of cells to be selected when the previous range is reset.

Will be set only if reason is GridSelectionReason.SetCurrentCell, GridSelectionReason.MouseDown, GridSelectionReason.MouseMove.

Gets or sets the range of cells to be selected.  
Gets the current state of the user action and reason for this event (mouse, keyboard, or programmatic).  
The GridModel will raise a SelectionChanging event before it updates its internal data structures and a SelectionChanged event afterwards. A GridControlBase grid listens to this event and outlines the selected range of cells.

You can disallow the selection of specific cells at run-time when you assign true to System.ComponentModel.CancelEventArgs.Cancel.

You can also modify the GridSelectionChangingEventArgs.Range to include additional cells.


Syncfusion.Grid.Windows: 17.1460.0.47

See Also