private void comboClinic_SelectionChangeCommitted(object sender, EventArgs e) { if (!Security.CurUser.ClinicIsRestricted && //All is in comboClinic comboClinic.SelectedIndices.Contains(0) && //All is selected comboClinic.SelectedIndices.Count > 1) //Other clinics are also selected { comboClinic.SelectedIndicesClear(); //Force selection to just All comboClinic.SetSelected(0, true); } FillGrid(); }
private void comboBoxMultiProv_MouseLeave(object sender, EventArgs e) { if (comboBoxMultiProv.SelectedIndices.Contains(0)) { comboBoxMultiProv.SelectedIndicesClear(); } if (comboBoxMultiProv.SelectedIndices.Count == 0) { comboBoxMultiProv.SetSelected(0, true); } }
private void comboBoxMultiBilling_Leave(object sender, EventArgs e) { if (comboBoxMultiBilling.SelectedIndices.Count == 0) { comboBoxMultiBilling.SetSelected(0, true); } else if (comboBoxMultiBilling.SelectedIndices.Contains(0)) { comboBoxMultiBilling.SelectedIndicesClear(); comboBoxMultiBilling.SetSelected(0, true); } }