TDBGRIDS
Is it possiable -- and if it is how would i retrive records from a TDBGRIDS.
The place to exchange ideas and experiences on Delphi programming
http://forum.delphiarea.com/
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;