Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird behavior when grid has focus.
Message
 
À
12/11/1999 13:57:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00290652
Message ID:
00290685
Vues:
14
>>I have a grid bound to a table. If I call a form or procedure from the grid I have a problem with the Selected table staying selected. For example, in the load event of the form I have "Select myTable", but by the time it gets to init, the alias is back to the grid bound table! If I step through the code in the debugger, the alias doesn't change. There are no timers running to change the alias either. The way around this is to SET FOCUS to an object off the grid and then run the form or procedure. If I move the code to the click of a command button, here is what has to be done for it to work:
>>
>>Thisform.cmdButton.Setfocus
>>Thisform.cmdButton.Click
>>
>>Without the setfocus, the alias changes back to the grid bound table. Any ideas what is causing this?
>
>Grids select the alias of their recordSource while they have focus, and reset the alias when they lose focus. This is so column controlsources can have generic references: "MyField" instead of "Mytable.MyField".
>
>A little tricky to deal with sometimes, but this is how it works.

Thanks,
That's just the info I was looking for.

Marcus.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform