Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Getting selected value of databound combobox

$
0
0
If I populate a combo box manually with items, I can get the selected item using

comboBox.SelectedItem.ToString();

But now I have created a databound combobox, but cannot find out how to get its selected value.

comboBox.SelectedItem.ToString();

Returns System.Data.DataRow

and

comboBox.SelectedText.ToString()

returns "". Even though a value is selected.

How can I get the selected text/value of a datbound comboBox?? 

Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>