Class GridOleDataSourceMouseController
Implements the datasource part of an OLE drag-and-drop operation in a grid control.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridOleDataSourceMouseController : GridMouseController, IDisposable, IMouseController, IGridFocusHelper
Constructors
GridOleDataSourceMouseController(GridControlBase)
Initializes a new instance for GridDragSelectMouseController and attaches it to a grid.
Declaration
public GridOleDataSourceMouseController(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
HitTestSelectionEdge
Gets or sets HitTestSelectionEdge. Used internally.
Declaration
public static int HitTestSelectionEdge { get; set; }
Property Value
Type |
---|
System.Int32 |
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
DndStartDragDrop(Int32, Int32)
Starts the drag-and-drop operation at the specified row and column.
Declaration
public bool DndStartDragDrop(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
Returns
Type | Description |
---|---|
System.Boolean | True if operation was started; False otherwise. |
Remarks
If the grid supports drag-and-drop at the given coordinates, it will call Control.DoDragDrop.
EnableOleDataSource(Int32)
Sets drag-and-drop flags. See GridDragDropFlags.
Declaration
public bool EnableOleDataSource(int flags)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | flags | The GridDragDropFlags. |
Returns
Type | Description |
---|---|
System.Boolean | returns True. |
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 | The System.Windows.Forms.MouseEventArgsthat contains 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 parameter. 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 | The System.Windows.Forms.MouseEventArgsthat contains 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 | The System.Windows.Forms.MouseEventArgsthat contains 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 | The System.EventArgsthat contains 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 | The System.Windows.Forms.MouseEventArgsthat contains 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 | The System.Windows.Forms.MouseEventArgsthat contains event data. |