Is this a bug with DataSourced ComboBox?

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
 
J

John Wood

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top