Subject How to get a datafield of a row selected in a grid
Author Christian Gütter
Hi,

I have a TIB_Grid where my user can highlight a single row.
Then he is supposed to click a button which opens a window
which displays more information about the record which
was selected in the grid.

But due to the long lists of properties and methods of TIB_Grid,
I couldn't find out how to get the contents of the fields which
are selected in the grid.

It should be something like:

I := IB_Grid1.DataRow[IB_Grid1.Row];
S := Query.Row[I].FieldByName('XYXY').AsString;

So S would contain the contents of a certain field of
the currently (in the grid) selected row.

Of course, this is pseudo-code, but I guess someone can
tell me how to do it in the right way!


TIA,

Christian