How to get selected value of combobox filled by entityframework 6

  • Thread starter Thread starter Rashiya
  • Start date Start date
R

Rashiya

Guest
Hi all, I filled my combobox by calling stored procedure using EF6, now when I want to get the selected value an exception occurred saying Input string was not in a correct format. So the selected value show { cust_id = 120 , cust_name= John} not cust_id = 120 as usual.

This is the code I used to fill the combobox...


using (sales_db = new salesEntities1(constr.get_cons()))
{
var get_custms = sales_db.get_cstmrs(comboBox_supliers_custmrs.Text).ToList();
comboBox_supliers_custmrs.DataSource = get_custms;
comboBox_supliers_custmrs.DisplayMember = "cust_name";
comboBox_supliers_custmrs.ValueMember = "cust_id";
}



Thanks in advance...

Continue reading...
 
Back
Top