TMS - properly delete dbPlanner1 Item

174 views Asked by At

I tried :

procedure TForm4.Delete1Click(Sender: TObject);
    begin
dbPlanner1.FreeItem(dbPlanner1.Items.Selected);
end;

But I end up with a sql wait cursor.It deletes the item but I need to click somewhere else to get rid of it. Hitting DEL on keyboard deletes without that cursor. What am I missing?

1

There are 1 answers

0
user763539 On BEST ANSWER

If you are doing this with a popupmenu menuitem then close the menu :

procedure TForm4.Delete1Click(Sender: TObject);
    begin
dbPlanner1.FreeItem(dbPlanner1.Items.Selected);
ItemPopup.CloseMenu;
end;