Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I disply record in a grid after changing index
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00295803
Message ID:
00295829
Vues:
22
>I have a grid with seven columns. All works great. In the click event of several headings I have some code to change the index order.
>
>select cust
>mrecno = recno()
>set order to lname ( or what ever column they clicked in)
>goto mrecno
>thisform refresh
>
>I want the grid to continue to display the currently selected record. Instead it jumps to a different record most of the time. Any suggestions?

John,

My first sufggestion is to dump all the goto rec stuff. Changing the order of a table does not move the record pointer so you don't need to restore it. Second, don't call the form's refresh, instead call the grid's refresh as in;
* Header click
select cust
set order to lname
this.parent.parent.refresh()
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform