menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridSelectionChangingEventArgs - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridSelectionChangingEventArgs

    Provides data about the cancelable SelectionChanging event.

    Inheritance
    System.Object
    SyncfusionCancelEventArgs
    GridSelectionChangingEventArgs
    Inherited Members
    SyncfusionCancelEventArgs.ToString()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public sealed class GridSelectionChangingEventArgs : SyncfusionCancelEventArgs
    Remarks

    The GridSelectionChangingEventArgs is a custom event argument class used by the SelectionChanging event when the model is in the process of selecting a range of cells as a result of a SelectRange(GridRangeInfo, Boolean) method call.

    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 Range to include additional cells.

    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.

    Constructors

    GridSelectionChangingEventArgs(GridRangeInfo, GridSelectionReason)

    Initializes the new instances of the GridSelectionChangingEventArgs class.

    Declaration
    public GridSelectionChangingEventArgs(GridRangeInfo range, GridSelectionReason reason)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range of cells to be selected.

    GridSelectionReason reason

    The current state of the user action and reason for this event (mouse, keyboard, or programmatic).

    GridSelectionChangingEventArgs(GridRangeInfo, GridSelectionReason, GridRangeInfo)

    Initalizes a new object.

    Declaration
    public GridSelectionChangingEventArgs(GridRangeInfo range, GridSelectionReason reason, GridRangeInfo clickRange)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range of cells to be selected.

    GridSelectionReason reason

    The current state of the user action and reason for this event (mouse, keyboard or programmatic).

    GridRangeInfo clickRange

    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.

    Properties

    ClickRange

    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.

    Declaration
    [TraceProperty(true)]
    public GridRangeInfo ClickRange { get; }
    Property Value
    Type
    GridRangeInfo

    Range

    Gets or sets the range of cells to be selected.

    Declaration
    [TraceProperty(true)]
    public GridRangeInfo Range { get; set; }
    Property Value
    Type
    GridRangeInfo

    Reason

    Gets the current state of the user action and reason for this event (mouse, keyboard, or programmatic).

    Declaration
    [TraceProperty(true)]
    public GridSelectionReason Reason { get; }
    Property Value
    Type
    GridSelectionReason

    See Also

    GridSelectionChangingEventHandler
    SelectionChanging
    GridSelectionChangedEventArgs
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved