Custom display format for databound combo box

  • Thread starter Thread starter Cory Burkhardt
  • Start date Start date
C

Cory Burkhardt

I would like to be able to customize how data is displayed in my databound
combo box. The user will be selecting one of these values which will
correspond to a row in the database. However, I do not want it to display
in the selection items simple a single value from each row. I would like
for it to display a combination of two column values. For instance, suppose
I have this data:

ID, value1, value2
--------------------
1, data-A1, data-A2
2, data-B1, data-B2

And I want the combo box to display the items like this:
"data-A1 and data-A2" with value of 1
"data-B1 and data-B2" with value of 2

I could do this by selecting composite data in my original SELECT statement,
with: value1 + ' and ' + value2 as DisplayValue. However, this won't stay
current as I update the rows in the local cache. Is there a way to have the
databound combo box's composite display automatically update as the rows are
being modified?
 
Back
Top