Subject Re: [IBO] Accessing Field Contents
Author Helen Borrie
At 02:33 AM 24/09/2003 +0200, you wrote:


>nibarkins schrieb:
> > How can I access the contents of the fields of the current row in a
> > DBGrid? Something like DBGrid1. --- .Text? The answer is probably
> > staring me in the face, but I can't seem to find it.
>
>Yes, it's staring in your face - but better have a look at the
>underlying dataset and not the grid ;-)
>
>Just use the TIB(_)Dataset.FieldByName property
>
>:-)
>
>Luc.

Luc, with a DBGrid I think you have to do

MyIBOQuery.FieldByName(MyGrid.Columns[n].FieldName).PropertyOrMethod
or
MyIBOQuery.FieldByName(MyGrid.SelectedField.FieldName).PropertyOrMethod

Helen