79384822

Date: 2025-01-24 15:31:27
Score: 0.5
Natty:
Report link

I know this is 3 years old but another way if you bind to an IEnumerable(Of Entity):

     For Each item In items
         combo.Items.Add(role)
     Next
    
    Combo.SelectedItem = items.Where(Function(x) x.ValueToSelect = ValueToSelect).FirstOrDefault()

Index = combo.selectedIndex
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ian Jowett