Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid order - how to prevent jumping?
Message
De
02/05/2001 14:20:10
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00502661
Message ID:
00502663
Vues:
14
>Hello everyone,
>
>I have a form with two grids. The main table is BldMstr, the other is Lender. BldMstr is ordered by lName. I scroll through the grid and if I find lender code, which could be changed, I dblclick on the Lender grid and this action puts new Lender code into Lender field and assign NULL to lname. It also calls tisform.Next() method, which moves to the next record. Now you can easily see my problem: I assign NULL, so the record pointer jumps to the top, which is inconvenient for the user. What would be the best and simplest way to move to the next record, which was next before assigning NULL.
>
>Thanks in advance.

Been a while since I worked with grids...but whereever you are doing the insert, I would think you'd have to capture the record number of the record the user is on before the insert is performed. That way you could return and SKIP to the next one.

One way to do this might be thru the grid.BeforeRowColChange method (put code there to save the RECNO() to a form property).

Hope that helps...
Dan LeClair
www.cyberwombat.com
SET RANT ON - The Wombat Blog

Life isn’t a morality contest and purity makes a poor shield. - J. Peter Mulhern
Disclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform