Subject RE: [IBO] Readonly columns in grid
Author Claudio Valderrama C.
> -----Original Message-----
> From: Rik [mailto:rik@...]
> Sent: Martes 10 de Abril de 2001 2:18
>
> how can I set certain columns readonly in a TIB_Grid without setting the
> readonly property in the field properties of the query.
> (because the user can change the values outside the grid)

If you are saying that all fields shown in the grid are for read only
purposes, then turn IB_Grid.ReadOnly to True and it's done. Or do you want
to edit some fields only outside the grid but other fields should be
editable inside the same grid?

Now, if you really want to make only a few columns of all columns displayed
in the grid to behave as R/O columns but only for the grid and not for other
data controls, you have to write code. Currently, TIB_Grid.GridLinks allows
the syntax like this example:

myfield=WIDTH=45;ALIGN=C

but if you wait for the next subrelease, you will be able to do

myfield=WIDTH=45;ALIGN=C;RO=Y

where RO=Y (or RO=Yes) is the flag indicating that this field should be
treated as Read Only inside the grid. You can write RO=N (RO=No) if you
want, but if the field is already R/O due to the dataset, you won't be able
to force it to become R/W. Doing the opposite would be bizarre.

C.