Re: Combo Box Display Value
- From: Stefan Wuebbe <stefan.wuebbe@xxxxxx>
- Date: Tue, 03 Nov 2009 09:33:43 +0100
Sithu wrote:
Hi all,
I have a combo box which has 2 columns : col1 an col2.
Bound column is col1.
When I select an item from the drop down list, it displays the value
of col1 as selected.
This is NOT what I want.
I want to display the values of col1 and col2 as selected.
How can I make it ?
With regards,
Sithu
You can have invisible columns in your Combo.RowSource.
The first column is always the one that gets displayed in
the combo's textbox area, i.e. when the combo is collapsed.
So in your scenario, you can put your concatenated two
columns into column one of the rowsource.
That way it gets displayed as combo.DisplayValue.
And put the content of the two separate columns into
RowSource column two and three, because you want to
display them in the dropdown.
If you additionally set ColumnCount = 3, and
ColumnWidths = '0,100,100', the first (concatenated) column
would be the combo.DisplayValue, but not appear in the
drop-dpwn area.
Additionally you can have invisible columns, for instance
a fourth one that contains the actual key value.
It would not get displayed anyway when combo.ColumnCount=3,
but you can make it combo.Value when you set
combo.BoundColumn = 4
If the bound column is numeric, you'll need combo.BoundTo=.T.
hth
-Stefan
.
- Follow-Ups:
- Re: Combo Box Display Value
- From: Sithu
- Re: Combo Box Display Value
- References:
- Combo Box Display Value
- From: Sithu
- Combo Box Display Value
- Prev by Date: Re: Combo Box Display Value
- Next by Date: Re: Combo Box Display Value
- Previous by thread: Re: Combo Box Display Value
- Next by thread: Re: Combo Box Display Value
- Index(es):
Relevant Pages
|