FlexGrid for WinForms
BeforeMouseDown Event

Fires before the System.Windows.Forms.Control.MouseDown event is handled by the grid.
<C1DescriptionAttribute("Fires before the MouseDown event is handled by the grid.")>
Public Event BeforeMouseDown As BeforeMouseDownEventHandler
Dim instance As C1FlexGridBase
Dim handler As BeforeMouseDownEventHandler
AddHandler instance.BeforeMouseDown, handler
[C1Description("Fires before the MouseDown event is handled by the grid.")]
public event BeforeMouseDownEventHandler BeforeMouseDown
[C1Description("Fires before the MouseDown event is handled by the grid.")]
event BeforeMouseDownEventHandler^ BeforeMouseDown
This event fires before the grid processes the System.Windows.Forms.Control.MouseDown event, and gives the program a chance to customize the behavior of the control and optionally cancel the default handling of the mouse.
The code below handles the BeforeMouseDown event to detect clicks on row headers and provide OLE drag and drop functionality.
void _flex_BeforeMouseDown(object sender, C1.Win.C1FlexGrid.BeforeMouseDownEventArgs e)
	// start dragging when the user clicks the row headers
	HitTestInfo hti = _flex.HitTest(e.X, e.Y);
	if (hti.Type == HitTestTypeEnum.RowHeader)
		e.Cancel = true;  // cancel default handling
		HandleRowDragDrop(hti.Row); // handle row drag/drop

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also


C1FlexGridBase Class
C1FlexGridBase Members



Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback