Class GridControllerOptions
Defines which mouse controllers should be enabled for the grid.
This enumeration has a System.FlagsAttribute attribute that allows a bitwise combination of its member values.
Inheritance
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public sealed class GridControllerOptions : Enum
Remarks
When you assign this enumeration value to ControllerOptions, the grid will create or disable specified mouse controllers for the grid. Each of these mouse controllers implements the IMouseController interface and gets registered with MouseControllerDispatcher.
Fields
All
Enable support for all default mouse controllers.
Declaration
public const GridControllerOptions All
Field Value
| Type |
|---|
| GridControllerOptions |
ClickCells
This option enables a mouse controller that handles mouse events for cell elements. Enable this controller if you want cell renderers and cell button elements to receive mouse events.
Declaration
public const GridControllerOptions ClickCells
Field Value
| Type |
|---|
| GridControllerOptions |
Remarks
In its implementation of HitTest(MouseEventArgs, IMouseController) this mouse controller determines the cell renderer for the cell under the mouse cursor and calls this cell renderers OnHitTest(Int32, Int32, MouseEventArgs, IMouseController) method. Based on the cell renderers HitTest result, mouse events will be forwarded to that cell.
DragColumnHeader
This option enables a mouse controller that provides support for dragging column headers within the grid by clicking on a header and dragging it to a new position.
Declaration
public const GridControllerOptions DragColumnHeader
Field Value
| Type |
|---|
| GridControllerOptions |
Remarks
You can customize the mouse controller's behavior at run-time while the user is performing the action by subscribing to the QueryAllowDragColumnHeader and event.
DragSelectRowOrColumn
This option enables a mouse controller that handles user interaction for dragging selected rows or columns.
Declaration
public const GridControllerOptions DragSelectRowOrColumn
Field Value
| Type |
|---|
| GridControllerOptions |
Remarks
You can customize the mouse controllers behavior at run-time while the user is performing the action by subscribing to the SelectionDragging and SelectionDragged events.
You can change various options by changing AllowDragSelectedCols and AllowDragSelectedRows in Options.
ExcelLikeSelection
This option enables Excel-like selection behavior. (It is not really a controller ...) When the user selects a range of cells, the active range is outlined with a selection margin and a cross on the bottom-right side. See ActiveRange for SelectedRanges.
Declaration
public const GridControllerOptions ExcelLikeSelection
Field Value
| Type |
|---|
| GridControllerOptions |
None
Represents None.
Declaration
public const GridControllerOptions None
Field Value
| Type |
|---|
| GridControllerOptions |
OleDataSource
This option enables a mouse controller that handles user interaction OLE drag support for selected range of cells when the user clicks the mouse button on the edge of the selected range.
Declaration
public const GridControllerOptions OleDataSource
Field Value
| Type |
|---|
| GridControllerOptions |
Remarks
You can customize the mouse controller's behavior at run-time while the user is performing the action by subscribing to the QueryCanOleDragRange event.
You can change various options with EnableOleDataSource().
When you change ControllerOptions in GridModelOptions, this will actually end up calling EnableOleDataSource() for each associated view.
OleDropTarget
This option enables a mouse controller that handles user interaction for OLE drop support when the user drags data from within the grid or an outside application.
Declaration
public const GridControllerOptions OleDropTarget
Field Value
| Type |
|---|
| GridControllerOptions |
Remarks
You can customize the mouse controller's behavior at run-time while the user is performing the action by creating an object that implements IGridDataObjectConsumer and register this object with RegisterDataObjectConsumer(IGridDataObjectConsumer). This allows you to add support for additional clipboard formats to be dragged into the grid from outside applications.
You can change various options with EnableOleDropTarget().
When you change ControllerOptions in GridModelOptions this will actually end up calling EnableOleDropTarget() for each associated view.
ResizeCells
This option enables a mouse controller that handles user interaction for resizing rows or columns with the mouse.
Declaration
public const GridControllerOptions ResizeCells
Field Value
| Type |
|---|
| GridControllerOptions |
Remarks
You can customize the mouse controller's behavior at run-time while the user is performing the action by subscribing to the ResizingColumns and ResizingRows events.
You can change various options by changing ResizeRowsBehavior and ResizeColsBehavior in Options
SelectCells
This option enables a mouse controller that handles user interaction for selecting cells with the mouse.
Declaration
public const GridControllerOptions SelectCells
Field Value
| Type |
|---|
| GridControllerOptions |
Remarks
You can customize the mouse controller's behavior at run-time while the user is performing the action by subscribing to the SelectionChanging and SelectionChanged events.
You can change various options by changing AllowSelection.