Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomGridTableView.OnCellDblClick Event

In This Article

Occurs every time a user double-clicks a cell.

#Declaration

Delphi
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 OnCellDblClick and OnCellClick events as shown below.

Delphi
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