>I have a grid with several grid columns that are readonly=.f. and WHEN returns .f.. So it is not enterable and it does not take focus, but it can become the selected cell - as indicated by the blue box around the cell - if you click directed on the cell. Normally i would not care, but the controlsource of this textbox cell is a function and when you click on the cell, the grid repaints with some cells gray, some cells appear empty with only formatting characters - very goofy looking and not correct. So ... is there a way to say that you do not want a grid sell to become selected? Is this a known problem with grid textboxes that have Controlsource = function?
>
>Thanks
>
>Brenda
If Column.ControlSource = expression,
then every time you enter into the column cell
VFP set currentControl.ReadOnly = .T.
This is:
correct when
Column.Bound = .T.
incorrect ( a bug ) when
Column.Bound = .F.
A general workaround exist,
but require that the currentControl is a VCX class,....
A specific is
( only for
- not reordered grid
- with one cell control only
- bound = .F.
- currentcontrol.controlsource is not a expression ):
IF This.Columns[m.nColOrder].Name="thecolumnName"
This.Columns[m.nColOrder].Controls[1].ReadOnly = .F.
ENDIF