private void lbValuesets_SelectedIndexChanged(object sender, EventArgs e) { if (lbValuesets.SelectedValue != null) { btnOk.Enabled = true; List <Option> eliminationSource = Option.GetOptions("Elimination"); eliminationSource.AddRange(VariableFacade.GetValuesListByValueset(lbValuesets.SelectedValue.ToString())); eliminationComboBox.DataSource = eliminationSource; List <Model.PxValue> valuesOfSelectedValueset = VariableFacade.GetValuesByValueset(lbValuesets.SelectedValue.ToString()); pxValueSetBindingSource.DataSource = VariableFacade.GetValueSet(lbValuesets.SelectedValue.ToString()); dgwValues.DataSource = valuesOfSelectedValueset; } else { btnOk.Enabled = false; } }