Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox woes, where did displayvalue go?
Message
De
29/01/1999 12:25:30
 
 
À
29/01/1999 12:01:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00181860
Message ID:
00181879
Vues:
7
>>I am using a combobox in a grid. I have it linked to an employee table, boundto=.t., boundcolumn=2, rowsource=a cursor with two columns (col1 is the name, col 2 is the emp number), controlsource is a table field with an integer employee number. When I activate and pulldown the combobox, the name that was there is not selected in the pulldown, the first item is selected instead. Further, when I select an item the name doesn't show in the display, it remains blank until the combobox loses focus. Any ideas as to what is happening here? I the same combobox on the form and I am not having these problems with it. In fact I copied the combobox to the grid, just to make sure they were the same! Oh I should also tell you that the column.sparse=.f. and the combobox is the current control, I left the textbox in the column though.
>>
>>Please, help!
>>TIA!!!
>>tc
>
>May I make unrelated suggestion? Could you use right-click menu instead of combo in grid? It works more reliable, especially when you have integer foreign keys.
>I mean, that you still show 'name' from lookup table in grid.column.textbox (not editable) and invoke shortcut menu from textbox.rightclick event.

Edward,
Thank you so much for your quick response!
Sounds like a workable solution, but I have never done this before. I assume I would have to do some table manipulation, such as a SQL update upon menu selection, update the textbox display, etc. It sounds like a bit of work. Is there no way to get the combobox working properly? I have had this problem intermittently on forms as well as in grids. If not, do you have an example of how to do the popup menu thing?

Thanks again,
tc
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform