Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Readonly Column - ControlSource=func - Problem
Message
From
06/01/2006 13:29:51
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01084177
Message ID:
01084201
Views:
44
>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 ):
* grid.AfterRCC(nColOrder)
IF This.Columns[m.nColOrder].Name="thecolumnName"
   This.Columns[m.nColOrder].Controls[1].ReadOnly = .F.
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform