Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox in Grid?
Message
 
 
À
10/05/2001 10:30:06
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00505772
Message ID:
00505775
Vues:
24
Hi!

You cannot do this so directly because combobox values are only numeric or character.
You can do manual binding: In the refresh method add code to read a value from the field and set propert ListIndex to display proper value. When editing, write the proper value to the field. For grid you can use expression like 'transform(Field)' in the control source of the column, but column will be read-only. Finally, if you want such combobox in grid editable, you require to add a function that will refresh combobox for you for each grid row and specify this function to be called during evaluating of the expression for each grid row. You can use Dynamic* properties of the column for that.

HTH.

>Hi guys:
>
>I have a problem that is driving me nuts.
>
>I have a combobox in a grid that has an array row source:
>
>thisform.aCostFrom(1,1) = 'Template'
>thisform.aCostFrom(1,2) = .F.
>thisform.aCostFrom(1,1) = 'Catalog'
>thisform.aCostFrom(1,2) = .T.
>
>The value in the table is cost_from which is a logical field. How do I set the combobox to be bound to the table.cost_from and display 'Template' or 'Catalog' in the value.
>
>I keep getting -- value: data type mismatches -- no matter how I set the properties.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform