Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enabling and disabling rows/columns in a Grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00960928
Message ID:
00961029
Views:
10
>Thanks, Nadya. That seems to work. I tend to forget that, even though the grid has may rows, only one is actually active at a time, so setting the state of the entire grid only really affects the row you happen to be in at the moment.
>
>Of course, logically, setting the .Enabled property for each of the controls in the grid should work as well. Unfortunately, behind the scenes something seems to be getting evaluated late.
>
>I DID discover something else though. Even though I'm not directly setting the .ReadOnly property of the column and its CurrentControl, the .ReadOnly property of the CurrentControl gets set to .T. when its .Enabled property is set to .F. - but only after the control loses focus. You have to move out of the control and back into it to see that the value changes. VFP (or the control itself) must be doing it automatically.
>
>At first, I thought this might be my problem. However, resetting the .ReadOnly property in the .AfterRowColChange event does not seem to affect the control at all. You still have to move out of the control and back into it before it becomes modifiable. It appears that the only way to make it work the way I want it to is to forget about the .Enabled and .ReadOnly properties at the column/current control level and just use the grid-level .ReadOnly property.
>
>Thanks again,
>John

I think, this is what I used, but I have to admit, I didn't make such extensive analysys as you did.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform