Topic: [Script] Adding a menu item for the component TableGrid

Adding a menu item for the component TableGrid



procedure Form1_OnShow (Sender: string; Action: string);
var
   MyItem1: TMenuItem;
begin
   MyItem1 := TMenuItem.Create (Form1);
   MyItem1.Caption := 'My Item1';
   MyItem1.OnClick := @MenuClick1;

   Form1.GridEmployees.dbPopupMenu.Items.Insert(0, MyItem1);
end;

procedure MenuClick1;
begin
    ShowMessage('Hello from PopupMenu');
end;

begin
end.


Download project:
http://myvisualdatabase.com/forum/misc. … download=1

Dmitry.