G
Guest
Hi!
I have a tedious problem with comboboxes, as they don't display data
correctly.
Suppose I have a combobox "cmbEmployees" that shows Employee objects; class
Employee has an "Id" member and a "CompleteName" member. I set up my combobox
so to have "Id" as valuemember and "CompleteName" as displaymember. This
works good when I bind my data (cmbEmployees.DataSource=dao.GetEmployees()
and then getting an Id to display and setting cmbEmployees.SelectedValue to
it). The weird things come when I set the "Sorted" property to true... The
combobox doesn't display the employee with the requested Id... What's wrong?
Thank you in advance!!
Paolo
I have a tedious problem with comboboxes, as they don't display data
correctly.
Suppose I have a combobox "cmbEmployees" that shows Employee objects; class
Employee has an "Id" member and a "CompleteName" member. I set up my combobox
so to have "Id" as valuemember and "CompleteName" as displaymember. This
works good when I bind my data (cmbEmployees.DataSource=dao.GetEmployees()
and then getting an Id to display and setting cmbEmployees.SelectedValue to
it). The weird things come when I set the "Sorted" property to true... The
combobox doesn't display the employee with the requested Id... What's wrong?
Thank you in advance!!
Paolo