Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to disable editing conditionally in the grid's column?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
How to disable editing conditionally in the grid's column?
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01550521
Message ID:
01550521
Views:
210
Hi everybody,

I have a grid with 2 columns and for one particular value in the first column (which is the first row), I want to disallow editing in the second column which has the complex container. I tried adding code in the grid's afterrowcolchange event to make that column readonly, but this didn't work. I tried to add code to the container's gotfocus event, but it doesn't seem to fire either.

I am wondering what is the way to disable all controls in that container if myCursor.Column1 = 'Some Value'

Thanks in advance.

The problem is that even if I set the textbox in that container to be disabled (enabled = .f.) after I click on that textbox (which is disabled) I am still able to type.

UPDATE. I have been able to solve it by adding code in the When event of the textbox of the container class and also in the refresh method of the grid's column.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform