Is this a bug with DataSourced ComboBox?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a ComboBox and used one of my DataTables as the DataSource. I set
the DisplayMember to the column of the text I want shown to the user while I
set the ValueMember to the ID column.

I then started to test it when I realized I'm getting the wrong ID for the
textI choose in the ComboBox...

It turns out that if you sort ComboBox, the DisplayMembers get sorted but
the ValueMembers do not reflect this change in order, they continue to map to
the same IDs previously...

Any workaround for this?

Maybe this is fixed in the latest version of .NET, I'm still using 1.1
 
Might be a bug yeah.
As a workaround, why not bind to the default dataview and set the sorting on
that instead.
Hope that helps.
 
Back
Top