Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mostly working combo in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Mostly working combo in a grid
Miscellaneous
Thread ID:
00260214
Message ID:
00260214
Views:
65
I'm (finally) starting to do some UI programming (most of my work is backend work/HTML) and I can't seem to make this work. I've got a grid that has a combobox (List style) in it.

The table populating the grid looks like:

RLine
------
linenum : N(3,0)
Desc : C(20)
fk_dept : N(11)
...

The table used to populate the combo in the grid:

All of the tables are actually views, so I set the RowSourceType to 6 - Fields.

Dept
-------
iid : N(11)
Department: C(20)

RLine.fk_dept is linked to Dept.iid

I want the combo box to display the "department" field of Dept, but save the iid into RLine.fk_dept. So I set-up the combo box so that:

BoundColumn = 2
BoundTo = .T.
ControlSource = RLine.fk_dept
RowSource = dept.department,iid

The problem I'm having is that the combo displays the correct value when it's selected (it shows Dept.Department). However, when it's not selected it shows the actual key (RLine.fk_dept). I've tried changing the "parent" column's Control Source to RLine.fk_dept (among others), and setting the Bound property to .T., but it still displays fk_dept instead of Dept.Department or just plain doesn't work at all.

Any ideas on what I'm missing here? Any really good builders I can use for this instead? ;-)
-Paul

RCS Solutions, Inc.
Blog
Twitter
Next
Reply
Map
View

Click here to load this message in the networking platform