ComboBox SelectedText

G

Guest

Hell

I’m trying to get the selected text from a combobox. But I can’

I use a sqlServer stored procedure to populate the combo, like this

Dim objComm As New SqlComman
Dim objDataSet As New DataSe
Dim ObjdataAd As New SqlDataAdapte
With objCom
.Connection = objCon
.CommandType = CommandType.StoredProcedur
.CommandText = “SelectOrigâ€
End Wit
ObjdataAd.SelectCommand = objCom
ObjdataAd.Fill(objDataSet, “Origâ€
Combo.DataSource = objDataSet.Tables(“Origâ€
Combo.DisplayMember = “origemâ€

I set the property ValueMember to “codorigem†in design

In the event SelectedIndexChanged i use a textbox to view the selectedText of the combo. My problem is, the selectedtext is an empty string, but i can get the selectedvalu

Thanks for your help

Best wishe

Ana Rit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Problem with ComboBox 1

Top