Combobox valuemember

C

Cdude

Please can anyone tell me how to display the valuemember of a combobox
which is databound I have tried
MessageBox.Show(Combobox1.ValueMember.ToString()) this displays the
Column name to which the valuemember is databound.
 
C

Cdude

Please can anyone tell me how to display the valuemember of a combobox
which is databound I have tried
MessageBox.Show(Combobox1.ValueMember.ToString()) this displays the
Column name to which the valuemember is databound.

combo.selectedvalue
thanks
 
D

Duggi

Please can anyone tell me how to display the valuemember of a combobox
which is databound I have tried
MessageBox.Show(Combobox1.ValueMember.ToString()) this displays the
Column name to which the valuemember is databound.

ComboBox.SelectedItem
ComboBox.SelectedText
ComboBox.SelectedIndex
ComboBox.SelectedValue

One or combination of the above will solve your issue. For the return
values checkout MSDN Documentation at

http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox_members.aspx


-Cnu.
 

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

Top