Class GridDragSelectMouseController
Implements the dragging of selected rows or columns in a grid control.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridDragSelectMouseController : GridMouseController, IDisposable, IMouseController, IGridFocusHelper
Constructors
GridDragSelectMouseController(GridControlBase)
Initializes a new instance for GridDragSelectMouseController and attaches it to a grid.
Declaration
public GridDragSelectMouseController(GridControlBase Grid)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | Grid | The grid control. |
Properties
Cursor
The cursor to be displayed.
Declaration
public override Cursor Cursor { get; }
Property Value
Type |
---|
System.Windows.Forms.Cursor |
Overrides
Name
The name of this mouse controller.
Declaration
public override string Name { get; }
Property Value
Type |
---|
System.String |
Overrides
Methods
CancelMode()
CancelMode is called for the active controller after a MouseDown message when the mouse operation is cancelled.
Declaration
public override void CancelMode()
Overrides
GetAllowFixFocus()
Override this method in your GridMouseController and return False if it would interfere with your controller's state when the current cell would be focused and possibly scrolled into view.
Declaration
public override bool GetAllowFixFocus()
Returns
Type | Description |
---|---|
System.Boolean | A System.Boolean (True by default) that indicates if the grid is allowed to set the focus onto the current cells System.Windows.Forms.Control. |
Overrides
HitTest(MouseEventArgs, IMouseController)
HitTest is called to determine whether your controller wants to handle the mouse events based current context.
Declaration
public override int HitTest(MouseEventArgs e, IMouseController controller)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | A MouseEventArgs holding event data. |
IMouseController | controller | A mouse controller. |
Returns
Type | Description |
---|---|
System.Int32 | A non-zero value if the controller can and wants to handle the mouse event; 0 otherwise. |
Overrides
Remarks
The current winner of the vote is specified through the controller paramter. Your implementation of HitTest can decide if it wants to override the existing vote or leave it.
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 override void MouseDown(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | A MouseEventArgs holding event data. |
Overrides
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. MouseHover is called after MouseHoverEnter.
Declaration
public override void MouseHover(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | A MouseEventArgs holding event data. |
Overrides
MouseHoverEnter()
MouseHoverEnter is called when this controller signaled in HitTest that it wants to handle mouse events. MouseHoverEnter is called before the first time MouseHover is called.
Declaration
public override void MouseHoverEnter()
Overrides
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 override void MouseHoverLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | A reference to System.EventArgs holding event data. |
Overrides
MouseMove(MouseEventArgs)
MouseMove is called for the active controller after a MouseDown message when the user moves the mouse pointer.
Declaration
public override void MouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | A MouseEventArgs holding event data. |
Overrides
MouseUp(MouseEventArgs)
MouseUp is called for the active controller after a MouseDown message when the user releases the mouse button.
Declaration
public override void MouseUp(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | A MouseEventArgs holding event data. |