Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mostly working combo in a grid
Message
From
02/09/1999 06:21:03
Rex Mahel
Realm Software, Llc
Ohio, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00260214
Message ID:
00260507
Views:
11
Paul,

Small world. I just finished doing the same thing. What I did is set put both the department id and the department name in the view. The controlsource for the combo is the department name and in the combo valid I set the department id to the appropriate value, this way you see the department name whether the cell is selected or not and when the cell is selected, you can change the department name.

HTH

Rex

>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? ;-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform