Subject Re: [IBO] Grid cols does not alter FieldsIndex
Author Markus Ostenried
At 16:47 Thursday, 22.05.2003 +0100, you wrote:
>If at runtime I alter the column positions the corresponding FieldsIndex
>of the attached query does not alter. How do I get the column positions?

I think moving a grid's coloumn does only alter the FieldsIndex when using
the property editor of a TIB_Query at design time.

Maybe this is what you're looking for (from the IBObjects help):
<quote>
Get the column of the grid from the column index of the dataset.
Applies toTIB_CustomGrid
Declaration: property GridCol[Index:integer]: integer;
</quote>

Have a look at the TIB_CustomGrid property GridFields, too.
E.g. IB_Grid1.GridFields[0].FieldName should return the name of the field
displayed in the first grid column.
This is especially useful in a grid's OnDrawCell event where you need to
know which field you have to draw.

HTH,
Markus