Hi guys,
I want to get the select value from a combobox that is bound to a dataset.
For binding the combobox I use:
cboEmployees.DataSource = ds.Tables["employees"];
cboEmployees.ValueMember = "employee_number";
cboEmployees.DisplayMember = "employee_name";
To get selected value:
string SelectedValue = cboEmployees.SelectedValue.ToString();
I got this error message: Object reference not set to an instance of an object.
Could anyone help me with this?
Thanks in advance!