У меня есть форма окна (net 2.0) с элементами управления, привязанными к сущности (w / INotifyPropertyChanged) через BindingSource..works.
В той же форме у меня есть выпадающий список, который также подключен через BindingSource..works
Вот пример соответствующего кода:
m_PlanItemLookupBindingSource.DataSource = GetBusinessLogic().RetrievePaymentPlanLookups(); // Collection of PaymentPlans
paymentPlanType.Properties.DataSource = m_PlanItemLookupBindingSource;
paymentPlanType.Properties.DisplayMember = "Name";
paymentPlanType.Properties.ValueMember = "ID";
paymentPlanType.DataBindings.Add(new Binding("EditValue", m_PlanBindingSource, "PaymentPlanID", true, DataSourceUpdateMode.OnPropertyChanged, null, "D"));
agencyComission.DataBindings.Add(new Binding("EditValue", m_PlanBindingSource, "AgencyCommission", true, DataSourceUpdateMode.OnPropertyChanged, null, "P1"));
billingType.DataBindings.Add(new Binding("Text", m_PlanBindingSource, "BillingType"));
Поэтому, когда я изменял значение в раскрывающемся списке, я думал, что свойство Current m_PlanItemLookupBindingSource Current будет меняться вместе со свойством PaymentPlanID объекта, который действительно изменяется.
Просто немного сбит с толку.
Спасибо заранее,
Стивен