Skip to main content

TcxCustomGridTableView.OnCellDblClick Event

Occurs when an end-user double-clicks on a cell within a View.

Declaration

property OnCellDblClick: TcxGridCellClickEvent read; write;

Remarks

The Sender parameter specifies the View containing the cell.

The ACellViewInfo parameter contains the ViewInfo information on the double-clicked cell: its display and edit values, its borders, and whether it can be edited or not, etc.

The AButton parameter identifies the mouse button which the double-clicked was performed with.

The AShift parameter determines the state of the Alt, Ctrl, and Shift keys and the state of the mouse buttons.

The AHandled parameter specifies whether the default handling of a double-click on the cell should be done after the event handler’s execution. Set the AHandled parameter to True to prevent the grid from handling double-clicks on the cells in the default way. The default handling includes activating the cell’s editor if any of the following conditions are met:

Note

If the View’s OptionsBehavior.ImmediateEditor property is set to True, a double-click’s first click fires the OnCellClick event to initiate the default handling of this click. To avoid this and allow double-clicks to activate a cell’s editor, handle the OnCellDblClick and OnCellClick events as shown below.

procedure <Form>.<View>CellClick(
  Sender: TcxCustomGridTableView;
  ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
  AShift: TShiftState; var AHandled: Boolean);
begin
  // ...
  AHandled := True;
end;
procedure <Form>.<View>CellDblClick(
  Sender: TcxCustomGridTableView;
  ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
  AShift: TShiftState; var AHandled: Boolean);
begin
  // ...
  AHandled := True;
end;
See Also