private void butRight_Click(object sender, EventArgs e) { if (listAvailableFields.SelectedIndices.Count == 0) { return; } RequiredField reqField; for (int i = 0; i < listAvailableFields.SelectedItems.Count; i++) { reqField = new RequiredField(); reqField.FieldType = (RequiredFieldType)comboFieldTypes.SelectedIndex; reqField.FieldName = _listFieldNames[listAvailableFields.SelectedIndices[i]]; RequiredFields.Insert(reqField); } RequiredFields.RefreshCache(); FillAvailable(); FillMain(); gridConditions.BeginUpdate(); gridConditions.ListGridRows.Clear(); gridConditions.EndUpdate(); labelExplanation.Text = ""; checkMedicaidLength.Visible = false; }