Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I stop access to certain rows in a grid??
Message
From
29/08/2005 14:56:13
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How do I stop access to certain rows in a grid??
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01044874
Message ID:
01044874
Views:
53
I have a grid with the following data:

Date Option Amount Completed
01/01/05 SPT 65 N
05/01/05 FPT 105 Y
09/01/05 XPT 25 N


I want to prevent changes to the data on a row if the completed indicator is "Y" and
allow changes to the row when the status is "N". I have added the following code
to the when event of each text box in a column to prevent changes to the data in
that textbox:

if thisform.grdOpt.column4.txtComp = "Y"
return .F.
endif

This works fine when the the first row in the grid has the completed value of "Y", however,
when the first row has a value of "N" in the completed text box I can still make make
changes to any data in a row where the status is "Y". IF I debug the value of the completed
text box when i click on another row it always has the value of the completed text box in the
first row.

How can I prevent any changes to a row where the completed value = "Y"?

Thanks in advance.
Stuart Reid

True nobility lies not in being superior to another man, but in being superior to one’s previous self
Next
Reply
Map
View

Click here to load this message in the networking platform