FlexGrid for WinForms
BeforeDoubleClick Event
Example 



Fires before the DoubleClick event is handled by the grid.
Syntax
'Declaration
 
<C1DescriptionAttribute("Fires before the DoubleClick event is handled by the grid.")>
Public Event BeforeDoubleClick As BeforeMouseDownEventHandler
'Usage
 
Dim instance As C1FlexGridBase
Dim handler As BeforeMouseDownEventHandler
 
AddHandler instance.BeforeDoubleClick, handler
[C1Description("Fires before the DoubleClick event is handled by the grid.")]
public event BeforeMouseDownEventHandler BeforeDoubleClick
[C1Description("Fires before the DoubleClick event is handled by the grid.")]
public:
event BeforeMouseDownEventHandler^ BeforeDoubleClick
Remarks
This event fires before the grid processes the System.Windows.Forms.Control.DoubleClick event, and gives the program a chance to customize the behavior of the control and optionally cancel the default handling of the mouse.
Example
The code below handles the BeforeDoubleClick event to detect double-clicks on cells in a specific column and provide a custom edit dialog instead of using the built-in editor.
void _flex_BeforeDoubleClick(object sender, C1.Win.C1FlexGrid.BeforeMouseDownEventArgs e)
{
	// detect double-clicks on column "Customer"
	HitTestInfo hti = _flex.HitTest(e.X, e.Y);
	if (hti.Type == HitTestTypeEnum.Cell && _flex[hti.Column].Name == "Customer")
	{
		e.Cancel = true;  // cancel default handling
		ShowCustomEditDialog(hti.Row, hti.Column); // handle row drag/drop
	}
}
Requirements

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

Reference

C1FlexGridBase Class
C1FlexGridBase Members

 

 


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

Send Feedback