cxgird Edit when double-clicking on a cell, disable when moving to another cell

49 Views Asked by At

First of all, I'm new and I apologize for asking for help on simple matters. When I double-click on the selected cell in Cxgrid, the cell can be edited, but I want editing to be disabled when I move to another cell.

Here is what I have so far:

var
  IsEditingEnabled: Boolean;
procedure TForm1.cxGridDBTableView1DblClick(Sender: TObject);
begin
  if IsEditingEnabled then
  begin
    cxGridDBTableView1.OptionsData.Editing := False;
    IsEditingEnabled := False;
    end
    else
    begin
    cxGridDBTableView1.OptionsData.Editing := True;
    IsEditingEnabled := True;
  end;
end;
0

There are 0 best solutions below