Class GridSelectCellsMouseController
Implements the cell selection behavior of a grid control.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridSelectCellsMouseController : GridMouseController, IDisposable, IMouseController, IGridFocusHelper
Constructors
GridSelectCellsMouseController(GridControlBase)
Initializes the new instance of the GridSelectCellsMouseController class.
Declaration
public GridSelectCellsMouseController(GridControlBase grid)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | grid | The grid control. |
Properties
Cursor
Gets the cursor to be displayed.
Declaration
public override Cursor Cursor { get; }
Property Value
Type |
---|
System.Windows.Forms.Cursor |
Overrides
MultiExtendedShouldMoveCurrentCell
Gets or sets a value indicating whether MultiExtended Should Move CurrentCell. Used internally.
Declaration
public bool MultiExtendedShouldMoveCurrentCell { get; set; }
Property Value
Type |
---|
System.Boolean |
Name
Gets the name of this mouse controller.
Declaration
public override string Name { get; }
Property Value
Type |
---|
System.String |
Overrides
Methods
CancelMode()
Overrides this method for the active controller after a MouseDown message when the mouse operation is cancelled.
Declaration
public override void CancelMode()
Overrides
Dispose(Boolean)
Disposes the unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
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
GridCurrentCellExternalMove(GridDirectionType, Int32, Boolean)
Grids the current cell external move.
Declaration
protected virtual bool GridCurrentCellExternalMove(GridDirectionType direction, int num, bool extendSelection)
Parameters
Type | Name | Description |
---|---|---|
GridDirectionType | direction | |
System.Int32 | num | |
System.Boolean | extendSelection |
Returns
Type | Description |
---|---|
System.Boolean | returns boolean value |
HitTest(MouseEventArgs, IMouseController)
Overrides this method 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 System.Windows.Forms.MouseEventArgs holding event data.. |
IMouseController | controller | A IMouseController that has indicated to handle the mouse event. |
Returns
Type | Description |
---|---|
System.Int32 | A non-zero value if the button can and wants to handle the mouse event; 0 if the mouse event is unrelated for this button. |
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)
Overrides this method 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 System.Windows.Forms.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)
Overridden 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 System.Windows.Forms.MouseEventArgs holding event data. |
Overrides
MouseHoverEnter()
Overridden 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)
Overrides 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 System.EventArgs holding event data. |
Overrides
MouseMove(MouseEventArgs)
Overrides this method 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 System.Windows.Forms.MouseEventArgs holding event data. |
Overrides
MouseUp(MouseEventArgs)
Overrides this method 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 System.Windows.Forms.MouseEventArgs holding event data. |
Overrides
ProcessSetCurrentCell(Int32, Int32, GridSetCurrentCellOptions)
Sets the current cell. Used internally.
Declaration
protected virtual void ProcessSetCurrentCell(int rowIndex, int colIndex, GridSetCurrentCellOptions flags)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | |
System.Int32 | colIndex | |
GridSetCurrentCellOptions | flags |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |