How to get selected text in combobox

  • Thread starter Thread starter zleug
  • Start date Start date
Z

zleug

Guest
Hi All.
The ComboBox is binding to Entity table. And when I tried code:

string Name = ((Employee)EmpCombobox.SelectedItem).Name.ToString();
I got error message:
Cannot convert type 'System.Windows.Controls.ItemCollection' to 'ProjectName.Common.Employee'

How to fix the problem?

Thanks.

Continue reading...
 
Back
Top