Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping user in grid row
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00004541
Message ID:
00004547
Vues:
34
>Is there a simple way to keep a user on the current row of
>a grid? (I am designing grid-based data maintenance forms.
>Once the user selects Edit or Add, I want to keep them on the row until the record is saved or the changes cancelled.)
>
>At this point, I've worked out a scheme where I can detect
>if the row has changed, and then do a GOTO to move back to
>the current row being edited. But this can have some nasty
>side-effects.
>
>Is the perhaps some way in the BeforeRowColChange event to
>differentiate an impending row change from an impending
>column-only change? (If not, are there any change planned for VFP 5.0 that would help out in this regard?)

Hi Ira,
You might create a form property like THISFORM.WeAreEditing
and set it to .T. when you're editing the current record.Then
in the when event method of the textbox bound to the data you
could do the following:

IF thisform.WeAreEditing
RETURN .F.
ENDIF

I think this code would deny access to the field if he was
not finished with the first row. Ofcourse, you need to set
the flag .F. when the record is saved.

Good luck
Hugh
Microsoft hears loudest what the VFP community says about Visual FoxPro by looking at the bottom line!

Support the product. Buy the latest version!

Hugh Winters @ WorldData 408-512-1131
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform