Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping Track of Row and Column in Grid Upon Requery
Message
De
07/01/2001 09:51:27
 
 
À
02/01/2001 02:09:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00458363
Message ID:
00460313
Vues:
14
>>I have 7 grids on 7 pages of a pageframe on a form to display the Parent and 6 child Views of the Main form. I have added a textbox class to each column on each grid for doubleclicking the grid/cell and have an event or procedure fire. I use it to launch my "zoom in" form to zoom in on the currently selected record.
>>
>>While on the "Zoom In" form your able to navigate through the records of the child table. When I close the form and return to the grid I notice the grid doesn't update unless I issue a Requery command, however that causes the record pointer in the child view to move to the top of the currently selected records.
>>
>>I want the Grid to keep track of where I'm navigating in the "Zoom In" form and be on that record when I return.
>>
>>In the main form's data environment I have just the Parent View. This is because most of the time the user may only open 1 or 2 of the child views and I didn't want to have all 6 child views opening everytime. So on the Activate method of each page I call a custom method "GetView" to open the needed view and Requery to refresh the grid(s).
>>
>>Do I want to use the ActiveColumn and ActiveRow properties to track my location in the Grid?
>>
>>Thanks ahead of time.
>
>Elgin,
>ActiveRow would typically be same as recno() and using recno() is better IMHO. However since this is a view neither recno() nor activerow might point to previous record after an update. If possible use an identifier key (I use a key for childs too though they wouldn't have any child).

The key is far preferable, especially where the grid may contain records that have been added but not yet TABLEUPDATE()ed, which would have a negative record number associated with them.

The possibility that the record may no longer exist, or may have changed it's sort order in the grid should also be considered.

The other problem is that since he's dealing with a view, which may have revised it's order because of additions, deletions or updates done by other users, the record number at any given point in time is pretty useless with pviews, since they do not reflect the record number in the parent tables(s).
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform