我有一個窗體窗體(net 2.0),通過一個BindingSource.works綁定到一個實體(w/INotifyPropertyChanged)上。Winform BindingSources - 問題
在相同的形式我有一個下拉列表也通過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"));
所以,當我改變的值在下拉列表中,我認爲m_PlanItemLookupBindingSource Current屬性將隨着實際更改的實體的PaymentPlanID屬性一起更改。
只是有點困惑。
由於提前, 斯蒂芬