i have a list in Twwgrid as below:
i wan to delete the same stock at once with the right-click pop-up menu as shown above (eg. delete both OREO_CHOC_CREAM either is CTN or UNIT). But now i only can delete 1 by 1 with the code below, any idea to solve this problem?
procedure Tfrm1.mniDeleteClick(Sender: TObject);
begin
inherited;
with grdItems.DataSource.DataSet do begin
if (RecordCount <> 0) and (MessageBox( Application.Handle, 'Delete Record ?', 'Confirmation', MB_YESNO + MB_ICONQUESTION + MB_DEFBUTTON2 + MB_APPLMODAL) = IDYES) then
Delete;
end;
end;