开发者

Objects in DataGrid not firing ListChanged event in BindingList they are in

开发者 https://www.devze.com 2023-04-02 05:34 出处:网络
I have read pretty much all Stackoverflow questio开发者_Go百科ns about DataGrid, BindingList<T> and ListChanged and still have no answer.

I have read pretty much all Stackoverflow questio开发者_Go百科ns about DataGrid, BindingList<T> and ListChanged and still have no answer.

I have an object called Invoice : INotifyPropertyChanged, that has a BindingList<InvoiceLine> : INotifyPropertyChanged that consists of number of InvoiceLine : INotifyPropertyChanged objects.

Now when in the DataGrid that is bound to the BindableList<InvoiceLine> I change one of the properties of a InvoiceLine a PropertyChanged event is fired but ListChanged event is not fired on the BindableList<InvoiceLine>.

InvoiceLines is initialized like this:

this.InvoiceLines = new BindingList<InvoiceLine>();
this.InvoiceLines.ListChanged += new System.ComponentModel.ListChangedEventHandler(InvoiceLines_ListChanged);
this.InvoiceLines.RaiseListChangedEvents = true;
this.InvoiceLines.AllowEdit = true;
0

精彩评论

暂无评论...
验证码 换一张
取 消