procedure TForm1.Button1Click(Sender: TObject);
var
I: Integer;
BookmarkList: TBookmarkList;
Bookmark: TBookmark;
begin
Bookmark := Table1.GetBookmark;
try
ListBox1.Items.Clear;
BookmarkList := DbGrid1.SelectedRows;
for I := 0 to BookmarkList.Count - 1do
begin
Table1.GotoBookmark (Pointer (BookmarkList ));
ListBox1.Items.Add (Table1.FieldByName (
'Name').AsString);
end;
finally
Table1.GotoBookmark (Bookmark);
Table1.FreeBookmark (Bookmark);
end;
end;
end.