procedure TForm1.Button1Click(Sender: TObject);
var
Bookmark: TBookmarkStr;
I: Integer;
begin
DBGrid1.DataSource.DataSet.DisableControls;
Bookmark := DBGrid1.DataSource.DataSet.Bookmark;
try
for I := 0 to DBGrid1.SelectedRows.Count - 1 do
begin
DBGrid1.DataSource.DataSet.Bookmark := DBGrid1.SelectedRows[I];
// Here the current record of the data set is one of the selected ones
end;
finally
DBGrid1.DataSource.DataSet.Bookmark := Bookmark;
DBGrid1.DataSource.DataSet.EnableControls;
end;
end;
Users browsing this forum: No registered users and 18 guests