Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables from DataSet 2

Status
Not open for further replies.

khowell78737

Programmer
Nov 18, 2003
22
US
I have a dataset that is populating a combobox with the "DataSource", "ValueMember" and "DisplayMember" properties of the combo box.

I want to concancate (sp?) the values from two cells in a row to fill the "DisplayMember" property.

My code:
comboBox.DataSource = dataSet.Tables("tblCity")
comboBox.ValueMember = "fldCityID"
comboBox.DisplayMemeber = "fldCityName")

I want the "DisplayMember" property to have something like
"fldCityName, fldState"

How do I achieve this?

Thanks in advance!
Kevin
 
I think
Code:
comboBox.DisplayMemeber = dataSet.Tables("tblCity").Rows(0).Item("fldCityID") + "," + dataSet.Tables("fldCityName").Rows(0).Item("fldState")

Should work pretty well
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top