1、設定 DBGridEh-->option-->dgMultiSelect:=true
2、刪除代碼如下:
var
SeCount,i:Integer;
begin
SeCount:=DBGridEh2.SelectedRows.Count; //選中的數量
for i:=0 to SeCount-1 do
begin
with DBGridEh2.DataSource.DataSet do
begin
GotoBookmark(DBGridEh2.SelectedRows.items[i]);
Delete;
Next;
end;
end;
end;