I have data in my combobox1 and was wondering if it would be possible to sort the data in the combobox alphabetically?
I have spent ages trying to find the answer by searching the forum but couldnt find anything, I would really appreciate your help..
With ComboBox2
.DisplayMember = "Name"
.ValueMember = "FullName"
.DataSource = New IO.DirectoryInfo("Path").GetFiles() _
.Select(Function(fi) New With {.Name = _
IO.Path.GetFileNameWithoutExtension(fi.FullName), fi.FullName}) _
.ToArray()
End With
Sort your data first, then bind it to your combobox.