Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I stop access to certain rows in a grid??
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How do I stop access to certain rows in a grid??
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01044874
Message ID:
01044874
Vues:
52
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform