多選:
Procedure MutiSelect(Grid:TDBGrid);
begin
  Grid.DataSource.DataSet.First;
  While not Grid.DataSource.DataSet.Eof Do
    begin
      If Not Grid.SelectedRows.CurrentRowSelected then
         Grid.SelectedRows.CurrentRowSelected:=True;     
      Grid.DataSource.DataSet.Next;   
    end;
end;
操作:
Procedure MutiSelectOp(Grid:TDBGrid);
var
  i:integer;
begin
   If dgMultiSelect in Grid.Options then
    For i:=0 to Grid.SelectedRows.Count-1 Do 
    begin
      Grid.DataSource.Dataset.GotoBook(Pointer(Grid.SelectedRows.Items[i]));
      //此處對Grid.DataSource.Dataset進行處理 
    end;
end;