menu

WinForms

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

    Show / Hide Table of Contents

    Class GridDragColumnHeaderMouseControllerBase

    This is an abstract base class used by GridDragColumnHeaderMouseController. It implements the IMouseController interface to be used with MouseControllerDispatcher and provides common functions for hit-testing and drag and drop functionality used by the derived class.

    Inheritance
    System.Object
    GridDragColumnHeaderMouseControllerBase
    GridDragColumnHeaderMouseController
    Implements
    IMouseController
    IGridFocusHelper
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public abstract class GridDragColumnHeaderMouseControllerBase : IMouseController, IGridFocusHelper

    Constructors

    GridDragColumnHeaderMouseControllerBase()

    Initializes a new instance of the GridDragColumnHeaderMouseControllerBase class.

    Declaration
    public GridDragColumnHeaderMouseControllerBase()

    GridDragColumnHeaderMouseControllerBase(GridControlBaseImp)

    Initializes a new instance of the GridDragColumnHeaderMouseControllerBase class with the grid it is bound to..

    Declaration
    public GridDragColumnHeaderMouseControllerBase(GridControlBaseImp grid)
    Parameters
    Type Name Description
    GridControlBaseImp grid

    Properties

    ClickCellsController

    Gets the GridClickCellsMouseController which is used to forward mouse events to cell renderers.

    Declaration
    public GridClickCellsMouseController ClickCellsController { get; }
    Property Value
    Type
    GridClickCellsMouseController

    Cursor

    The cursor to be displayed.

    Declaration
    public virtual Cursor Cursor { get; }
    Property Value
    Type
    System.Windows.Forms.Cursor

    DragHeaderVisible

    Used internally. Gets or sets the dragHeaderVisible.

    Declaration
    public bool DragHeaderVisible { get; set; }
    Property Value
    Type
    System.Boolean

    Name

    The name of mouse controller.

    Declaration
    public virtual string Name { get; }
    Property Value
    Type
    System.String

    Methods

    CancelMode()

    CancelMode is called for the active controller after a MouseDown message when the mouse operation is cancelled.

    Declaration
    public virtual void CancelMode()

    GetAllowFixFocus()

    Implement this method in your IMouseController and return False if it would interfere with your controller's state when the current cell is focused and possibly scrolled into view.

    Declaration
    public virtual bool GetAllowFixFocus()
    Returns
    Type Description
    System.Boolean

    A System.Boolean that indicates if the grid is allowed to set the focus onto the current cells System.Windows.Forms.Control.

    GetColumnAtMousePosition()

    The column descriptor under the mouse position. Will be null if there is no header drawn below mouse.

    Declaration
    public int GetColumnAtMousePosition()
    Returns
    Type Description
    System.Int32

    returns mouse position

    GetGridControl()

    Returns the grid it is bound to.

    Declaration
    protected virtual GridControlBaseImp GetGridControl()
    Returns
    Type Description
    GridControlBaseImp

    The GridControlBase

    GetRedArrowIndicatorLocation(Int32)

    Gets the red arrow indicator location.

    Declaration
    public Point GetRedArrowIndicatorLocation(int colIndex)
    Parameters
    Type Name Description
    System.Int32 colIndex

    Index of the col.

    Returns
    Type Description
    System.Drawing.Point

    returns point

    HitTest(MouseEventArgs, IMouseController)

    HitTest is called to determine whether your controller wants to handle the mouse events based current context.

    Declaration
    public virtual int HitTest(MouseEventArgs e, IMouseController controller)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    The System.Windows.Forms.MouseEventArgs instance containing the event data.

    IMouseController controller

    The controller.

    Returns
    Type Description
    System.Int32

    returns int value to determine whether your controller wants to handle the mouse events based current context

    MouseDown(MouseEventArgs)

    MouseDown is called when this controller signaled in HitTest that it wants to handle mouse events and the user pressed the mouse button.

    Declaration
    public virtual void MouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs holding event data.

    Remarks

    MouseDown is called and this controller will become the active controller and receive all subsequent mouse message until the mouse button is released or the mouse operation is cancelled.

    MouseHover(MouseEventArgs)

    MouseHover is called when this controller signaled in HitTest that it wants to handle mouse events.

    Declaration
    public virtual void MouseHover(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs holding the event data.

    MouseHoverEnter()

    MouseHoverEnter is called when this controller signaled in HitTest that it wants to handle mouse events.

    Declaration
    public virtual void MouseHoverEnter()

    MouseHoverLeave(EventArgs)

    MouseHoverLeave is called when hovering ends either because user dragged mouse out of the hit-test area or when context changes (e.g. user pressed the mouse button).

    Declaration
    public virtual void MouseHoverLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The event args.

    MouseMove(MouseEventArgs)

    MouseMove is called for the active controller after a MouseDown message when the user moves the mouse pointer.

    Declaration
    public virtual void MouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs holding event data.

    MouseUp(MouseEventArgs)

    MouseUp is called for the active controller after a MouseDown message when the user releases the mouse button.

    Declaration
    public virtual void MouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs holding event data.

    ResetClickCellsController()

    Clears out pending state of ClickCellsController, possibly sending MouseHoverLeave or CancelMode notification to cell renderer.

    Declaration
    public void ResetClickCellsController()

    ShouldShowDragBitmap()

    Should the show drag bitmap.

    Declaration
    public bool ShouldShowDragBitmap()
    Returns
    Type Description
    System.Boolean

    returns Boolean value

    ShouldShowRedArrowIndicator()

    Determines based on mouse position if red arrow indicator should be shown

    Declaration
    public bool ShouldShowRedArrowIndicator()
    Returns
    Type Description
    System.Boolean

    returns Boolean value

    ShouldShowRemoveCursor()

    Determines based on mouse position if remove cursor should be shown

    Declaration
    public bool ShouldShowRemoveCursor()
    Returns
    Type Description
    System.Boolean

    returns Boolean value

    UpdateRedArrowIndicator()

    Used internally. Update the property values for RedArrowIndicator.

    Declaration
    public void UpdateRedArrowIndicator()

    Implements

    IMouseController
    IGridFocusHelper
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved