Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Get values from DBGrid
If you want to get values of all columns of selected row from DBGrid component, then use Fields and FieldCount properties, like in this example.
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
begin
Memo1.Clear;
with DBGrid1 do
begin
for i:=0 to FieldCount-1 do
Memo1.Lines.Add(Fields[i].AsString);
end;
end;
-
More for developers