[]
Fires before the DoubleClick event is handled by the grid.
public event BeforeMouseDownEventHandler BeforeDoubleClick
Type | Description |
---|---|
BeforeMouseDownEventHandler | Fires before the DoubleClick event is handled by the grid. |
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.
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
}
}