private async void FillCombobox() { foreach (var item in await SimpleDataSource.GetTestData(4)) { comboBoxEditCategory.Properties.Items.Add(item.Category); } }
private async void InitializeBindings() { _bindingSource.DataSource = await SimpleDataSource.GetTestData(); textEditName.DataBindings.Add(new Binding(nameof(textEditName.Text), _bindingSource, nameof(SimpleDataSource.SimpleData.Name))); comboBoxEditCategory.DataBindings.Add(new Binding(nameof(comboBoxEditCategory.EditValue), _bindingSource, nameof(SimpleDataSource.SimpleData.Category))); }