Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to refresh a grid
Message
De
01/03/2000 15:13:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Best way to refresh a grid
Divers
Thread ID:
00340043
Message ID:
00340043
Vues:
67
I have a grid that is tied to a view. And then I have a textbox that the user enters a name to search. After they press Search on a related button, I would like the view to be requeried with the possible matches showing in the grid.

More exactly, the view takes just the first letter of the entered name and requeries on that eg. if I entered Gaston in the textbox, the method just grabs the G and rebuilds the list on that. Then, I search the cursor for the closest match and what I want to do is to highlight the grid row with that match so that if there is 300 records returned, the best available match is highlighted.

I also really want the focus to stay on the textbox, not the grid but I am not sure how to do that and to have the highlighted row continue to be another colour (I used to be able to do it in FPW26 via a SHOW GET m.jnNameList and then I would put the focus back onto my text box via STORE OBJNUM(m.jcSearchName) TO _CurObj.

I did this in VFP but an wondering if there is another way:

THISFORM.grdNamesFound.Refresh()
THISFORM.grdNamesFound.SetFocus()
THISFORM.txtSearchName.SetFocus()

but then if I put the focus back on the text box, the grid loses it's colour (which could be a VMPro prob, not VFP). But maybe there is another way to do this that is better.

Albert
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform