var
  str :string;
  i :integer;
begin
  if DBGrid1.SelectedRows.Count>0 then
  with DBGrid1.DataSource.DataSet do
    for i:=0 to DBGrid1.SelectedRows.Count-1 do
      begin
        GotoBook(pointer(DBGrid1.SelectedRows.Items[i]));
        str :=FieldbyName('..').asString;
        showMessage(str);
      end
end