Databinding: What are the difference between Observablecollection and Bindinglist from a aatabinding perspective.

Hi,

Windows Presentation Foundation provides the ObservableCollection class for rich Databinding support.

Big question is: What about the BindingList<T>. Why using OberservableCollection and not Binding List and is it possible to use it with WindowsForms.

Josef Eising





Answer this question

Databinding: What are the difference between Observablecollection and Bindinglist from a aatabinding perspective.

  • egr9546

    I think because they both do different things. ObservalbleCollection is only notifies about changes, however BindingList provide functionaliy to create(cancel) new items, sortinag and so on.

    BTW you can easely implement INotifyCollectionChanged on top of the BindingList.



  • KenHerman

    Actually you can wrap BindingList around using BindingListCollectionView, then the BindingList can be used in WPF data binding scenario.

    But AFAIK, you can use ObservableCollection as binding source in Windows Forms applications, but it doesn't behave as it is in WPF applications.

    Sheva



  • Databinding: What are the difference between Observablecollection and Bindinglist from a aatabinding perspective.