PRB: AfterRowColChange Event Code Does Not Enable Grid Cell (157855)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
This article was previously published under Q157855 SYMPTOMS
If the Enabled property of a cell is changed in the AfterRowColChange
event, the effect may not take place immediately. A cell that should be
enabled may be disabled after moving to it from a disabled cell. Moving to
a different cell in that row and back again enables the cell.
CAUSE
The Enabled property at the column level is checked upon entry to the
field. If it is changed after entering a field, it is not looked at again
until you leave and re-enter the field.
WORKAROUND
If you wish to disallow editing of a cell based on the contents of the
cell, set the ReadOnly property to true (.T.) as shown below:
IF numb_char.numb>80000
This.Columns(ncolindex).ReadOnly=.F.
ELSE
This.Columns(ncolindex).ReadOnly=.T.
ENDIF
Furthermore, you can change the color of the active cell by following the
steps outlined in the following article in the Microsoft Knowledge Base:
129280 How to Change the Color of the Active Cell in a Grid
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 12/11/1999 |
---|
Keywords: | KB157855 |
---|
|