Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (someVar)
- {
- comboBoxAlpha.DataBindings.Add(new Binding("SelectedValue", this.bindingSource, "DecoratedStringEnum1", true));
- comboBoxAlpha.DataSource = new BindingSource(Utility.ToList(typeof(Person.DecoratedStringEnum1)), null);
- comboBoxAlpha.DisplayMember = "Value";
- comboBoxAlpha.ValueMember = "Key";
- }
- else
- {
- comboBoxAlpha.DataBindings.Add(new Binding("SelectedValue", this.bindingSource, "DecoratedStringEnum2", true));
- comboBoxAlpha.DataSource = new BindingSource(Utility.ToList(typeof(Person.DecoratedStringEnum2)), null);
- comboBoxAlpha.DisplayMember = "Value";
- comboBoxAlpha.ValueMember = "Key";
- }
Add Comment
Please, Sign In to add comment