Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to retain position
Message
De
14/03/2005 20:02:58
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00995759
Message ID:
00995789
Vues:
14
Victor (and others),

>Prior to saving the record you can use the binding context to get the position of the "pointer".
>
>iPos = this.BindingContext[this.dataset].position;
>
>Do your save then set the binding position like so:
>
>this.BindingContext[this.dataset].position = iPos;
>
>I'm sure there is more than one way to accomplish this task and this is one way.

Please clarify for me here. How does the .position = iPos guarantee to get you back onto the same record if the user has just saved a new record and then refreshed the dataset? In watching this discussion to learn, I was halfway expecting someone to suggest storing a unique key to the record and then doing some kind of locate in the dataset after the save to get back to the same record, even if it's no longer in the same position as before.

Does iPos = this.BindingContext[this.dataset].position save a key, or just a position (as in RECNO() of a cursor) in the previous set of records (which may be different or in a different order after the save and refresh)?

Educate me.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform