Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid and valid record after deletion
Message
De
30/03/2004 12:19:56
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Grid and valid record after deletion
Divers
Thread ID:
00890872
Message ID:
00890872
Vues:
48
I have encountered a grid problem and really need some assistance. I am puzzled and frustrated because I've successfully used this approach and code numerous times over the years. It works correctly on other grids in this same project.

What could I be overlooking in this specific instance!

(VFP 8, SP1 on Windows XP SP1)

Background:
A form (modeless) calls a modal form. This modal form has a grid on a page of a PageFrame. The grid's RecordSource is a buffered cursor, optimistic table buffering 5.

First: The grid displays three rows. There are four existing cursor record, to which I add a brand new blank (as the last row in the grid). There are now five cursor records.

Second: Via the form's keypress I call a deletion procedure to remove this newly added and never saved record. (The form object and the grid's currentcontrol are passed as parameters). The record pointer correctly points to the specific record to be removed.

The procedure issues tablerevert(.F., m.lcGridAlias). The tablerevert() successfully removes this particular record and returns the value of 1. The record pointer, as expected, is now on eof().

Finally: I reposition the record pointer to a valid record.

On this particular grid when I step through the code in the debugger, the record pointer correctly points to a valid record. All is just fine.

The problem:
During normal execution, i.e. no debugger, commands immediately subsequent to tablerevert() that should move the record pointer to a valid record (including gird object SetFocus and Refresh and goto top/goto bottom) apparently do not succeed. For whatever reason the record pointer remains on eof().

Before the grid will displays correctly focus must be moved away from and then back to the grid

What can I be overlooking? Ideas please! Thanks.
Répondre
Fil
Voir

Click here to load this message in the networking platform