Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo with 4 columns - array rowsource
Message
From
25/01/2006 13:01:10
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01090147
Message ID:
01090183
Views:
10
I am confused about how to make this work. I have a combo on a container that has an rowsource=array, boundcolumn=4, boundto=false, controlsource=(none), displayvalue= =m.subdivsion. The first three columns are displayed in the drop down, the fourth column is the boundto column and is used to sort the rows in the array. The four columns are subdivision, county, state, Upper(subdivision+county+state). m.subdivision, m.county and m.state are fields on the controling table. It is a subdivision name, county and state that make up a unique subdivision.

You need to add a surrogate primary key to the table that you are pulling the data from and use that as the boundColumn for your combo box. If this surrogate key is an integer (As it should be), you need to set the combo's BoundTo property to .T.

My problem is that I can not figure out how to position on the correct row of the drop down and how to only display the m.subdivision (first column of the dropdown) in the combo when it is closed.

If you follow my suggestion above, it will automatically be positioned on the correct row - no code required. Your problem is that you do not have a column that uniquely identifies the row in the combo.

FWIW, the combo always pulls its DisplayValue (what is displayed when the combo is "closed" from the first column of its internal list.
Previous
Reply
Map
View

Click here to load this message in the networking platform