Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid goto table's top record & show as top grid item
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01036855
Message ID:
01036857
Vues:
9
>I've always had this problem coding grids, so I thought it was time to learn a better way. How can you tell a grid to goto it's left-most column and top-record of the grid. I used doscroll(2) and (6) to scroll the grid by pages, but now knowing how many pages I would need, it's a hit & miss quess. What's the better way to do this. If I select a table with an index and say goto top, how do I get the grid to display the first row as the top record from the table? And, if the grid has a horizontal scrollbar, how to force the grid to display the left-most column as column1? Thanks for anyone who knows a better way!
>Jim Colombo.

Supposing that MyTable is RecordSource of the Grid and the Column1 is the LeftMost column in the Grid:
thisform.LockScreen = .t.
GO TOP IN MyTable
thisform.grid1.Column1.SetFocus()
thisform.grid1.refresh()
thisform.LockScreen = .f.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform