title: Validating with errorProvider using dropdownlist in Windows Forms?
body: <p>So basically I am trying to validate my drop down list (combobox) using the Validating event.  This works, but calls the focus to my drop down list, not allowing a selection to be made.</p>
  
  <p>Is there any way to get the errorProvider working with dropdownlist</p>
  
  <pre><code> if (ddlTypeOfPass.SelectedIndex &lt; 1)
              {
                  errorProvider1.SetError(ddlTypeOfPass, "Type of Pass is required");
                  e.Cancel = true;
                  return;
              }
              errorProvider1.SetError(ddlTypeOfPass, "");
      }
  </code></pre>