简体   繁体   中英

Assign TPoupMenu to Inplace editor in the TAdvColumnGrid

I am working on TAdvColumnGrid where I am facing one issue with the PopupMenu . I have assign a Popup Menu to the Grid. When the cell in the grid is selected/focused then on right click of Mouse button I can show the PopupMenu.

but if the column cell is in edit mode and I clicked right mouse button then the default windows Popup appear.

I want same popup to be shown as it is showing on cell selection.

Please find the below images of both the popup. 弹出窗口1和默认弹出窗口

please let me know if any more information is needed.

Thanks and regards, Ankit Balbudhe

You havent't mentioned version that you use. But for example for TAdvColumnGrid version 3.1.3.9 you could override the CreateEditor method:

type
  TAdvColumnGrid = class(AdvCGrid.TAdvColumnGrid)
  protected
    function CreateEditor: TInplaceEdit; override;
  end;

implementation

{ TAdvColumnGrid }

function TAdvColumnGrid.CreateEditor: TInplaceEdit;
begin
  Result := inherited;
  if Result is TAdvInplaceEdit then
    TAdvInplaceEdit(Result).PopupMenu := PopupMenu; { ← assign to editor popup menu }
end;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM