开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜