Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending Records in Grid and Setfocus()
Message
De
16/02/1999 14:22:22
Rene De Montbrun
Customer Contact Inc.
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00187925
Message ID:
00188081
Vues:
23
>>Hi All,
>>
>>Does anyone know how to set focus to a record that you append to a grid? I am using an Add button with APPEND BLANK and then myGrid.Setfocus(). A new record is being added to the bottom of the grid (as expected), but the focus jumps immediately from the appended record to the first record of the grid (not expected). Any insights would be appreciated.
>
>There are many ways to do this but you can:
>
>In grid.SetFocus()
>
>dodefault()
>go bottom
>thisform.refresh()
>
>If you don't want SetFocus to always do this, pass SetFocus a parameter telling it you want to go to the bottom:
>
>Call it this way: grid.SetFocus(.T.)
>
>lparameters plOK
>
>if plOK
>dodefault()
>go bottom
>thisform.refresh()
>else
>dodefault()
>endif
>
>You can also add another param to go to any record you like.

Hi Eric,

Thanks for your quick response. I tried your suggestions but they don't seem to work in my application. The behaviour is still the same (i.e. record gets appended, then focus jumps automatically from appended record to record at top of grid). Do you have any more suggestions?
Rene de Montbrun
Toronto
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform