[Lazarus] getting values from a DBGrid

Paul Ishenin webpirat at mail.ru
Mon Dec 14 00:02:02 CET 2009


Chris Jennings wrote:
> Given the following code
>
>     procedure TfrmCourses.DBGrid2DblClick(Sender: TObject);
>     begin
>        DBMemo3.Lines.Add(DBGrid2.???);
>     end;
DBGrid shows values from a DataSet, so use DataSet instead:
 Lines.Add(DataSet.FieldByName('MyField').AsString)

Best regards,
Paul Ishenin.




More information about the Lazarus mailing list