title: Find index of items in combox visual basic
body: <p>I am trying to set customer details on form load and have run in to an issue when ensuring a combobox is set to the right index.</p>
  
  <pre><code>For iIndex As Integer = 0 To (Me.combo.Items.Count - 1)
  
      If Me.combo.Items(iIndex).Key = customer.CustTypeId Then
          Me.combo.SelectedIndex = iIndex
          Exit For
      End If
  Next
  </code></pre>
  
  <p>The Items.Key comes from a Klik control that I am trying to convert to a standard ComboBox. I have tried accessing the RowId of the Item but to no avail.</p>
  
  <p>Can anyone suggest how to accomplish the above?</p>