E
Eric
Im populating a combobox from query results like that
below. This works great for populating the box, but I dont
want the selected text, but the ID info associated with
the selection. The query returns Name,ID. I only want to
display the Name in the box, but pull the ID value as the
selected value. I could do this with web forms in .net,
but not with Windows forms controls. Any help would be
great.
EXAMPLE:
Dim dreader As SqlClient.SqlDataReader
DTE.Open()
dreader = SelectExpense.ExecuteReader()
While dreader.Read()
CBO_EType.Items.Add(dreader(0).ToString())
End While
..
below. This works great for populating the box, but I dont
want the selected text, but the ID info associated with
the selection. The query returns Name,ID. I only want to
display the Name in the box, but pull the ID value as the
selected value. I could do this with web forms in .net,
but not with Windows forms controls. Any help would be
great.
EXAMPLE:
Dim dreader As SqlClient.SqlDataReader
DTE.Open()
dreader = SelectExpense.ExecuteReader()
While dreader.Read()
CBO_EType.Items.Add(dreader(0).ToString())
End While
..