[]
        
(Showing Draft Content)

C1.Win.C1FlexGrid.C1FlexGridBase.BeforeDoubleClick

BeforeDoubleClick Event

Fires before the DoubleClick event is handled by the grid.

Namespace: C1.Win.C1FlexGrid
Assembly: C1.Win.C1FlexGrid.4.8.dll
Syntax
public event BeforeMouseDownEventHandler BeforeDoubleClick
Returns
Type Description
BeforeMouseDownEventHandler Fires before the DoubleClick event is handled by the grid.
Remarks

This event fires before the grid processes the DoubleClick event, and gives the program a chance to customize the behavior of the control and optionally cancel the default handling of the mouse.

Examples

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, 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
	}
}