Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox in Grid?
Message
From
10/05/2001 10:34:02
 
 
To
10/05/2001 10:30:06
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00505772
Message ID:
00505775
Views:
25
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform