G
Guest
Hello
I use the following code to populate a combobox
Me.cbxPeerReview.DropDownStyle = ComboBoxStyle.DropDownLis
With cbxPeerRevie
.DataSource = dtEm
.DisplayMember = "STR_NAME_F
.ValueMember = "ID_USER
End Wit
Me.cbxPeerReview.DroppedDown = Tru
Me.cbxPeerReview.SelectedIndex = -
I want to sort to combobox by the "STR_NAME_F", but if I add the .sorted = true line, I get the following error
An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dl
Additional information: Cannot sort a ComboBox that has a DataSource set. Sort the data using the underlying data model
How do I sort the data using the underlying data model?
Thanks
Amber
I use the following code to populate a combobox
Me.cbxPeerReview.DropDownStyle = ComboBoxStyle.DropDownLis
With cbxPeerRevie
.DataSource = dtEm
.DisplayMember = "STR_NAME_F
.ValueMember = "ID_USER
End Wit
Me.cbxPeerReview.DroppedDown = Tru
Me.cbxPeerReview.SelectedIndex = -
I want to sort to combobox by the "STR_NAME_F", but if I add the .sorted = true line, I get the following error
An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dl
Additional information: Cannot sort a ComboBox that has a DataSource set. Sort the data using the underlying data model
How do I sort the data using the underlying data model?
Thanks
Amber