Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo in Grid
Message
De
06/10/2003 13:08:41
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
À
05/10/2003 06:45:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00834436
Message ID:
00835453
Vues:
30
Marcia

Here is my setup

combobox with:
rowsourcetype = 2-alias
rowsource = "mytable.descript,npk"
boundto=.t. I had to do this or the pk would not be stored
boundcolumn = 2
column1.sparse = .f.
column1.controlsource = "invoice_lines.productfk"

With the above setup in a grid I could not type anything in the combobox. The interactivechange evnet would NOT fire. Same combobox setup on a form would work fine. If I changed the setup to bind the character column then that would work as well. I also tried using a base class combobox to make sure that was not a problem with my framework.

Thanks for your help.

>I found the problem. It seems you can't bind the control to an integer and display a char. I think I should have known that already :(.
>
>Sure you can. This is what combo boxes are all about. Combo boxes are particularly powerful controls because they enable you to display descriptive text from a lookup table while binding the control to its associated key value. This is possible only because the combo box has these two properties. Understanding the role each of them plays can be confusing, to say the least.
>
>DisplayValue is the descriptive text that is displayed in the textbox portion of the control. This is what you see when the combo box is "closed." The combo's DisplayValue always comes from the first column of its RowSource. On the other hand, the combo's Value comes from whichever column is specified as its BoundColumn.
>
>Typically, when the combo is in a grid, most people just set the column's Sparse property to false. This way, the descriptive text is displayed in all the grid rows.
>
>The samples on oour web site offer some alternative solutions.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform