Hi EveryOne,
I am trying to TwoWay DataBind to my xamdatagrid with ObservableCollection. Its working fine to display data but its not allowing me to add new record in it and its the same case for generic List as well. Where if I use BindingList only then its enable me to add new record in my grid. Can any one know about the isse why is it so ? and if I want to use ObservableCollection to bind my xamdatagrid then please suggest me the solution that how can I achieve this functionality.
Thanks.
Thanks Alex for reply, yes it works.
Hello,
The AddNewRecord functionality is exposed through the IBindingList interface, so the underlying source collection should implement this interface. You can either derive from ObservableCollection and implement IBindingList or wrap the ObservableCollection into a collection view , like ListCollectionView,like this:
ObservableCollection<String> source = new ObservableCollection<string>();
ListCollectionView view = new ListCollectionView(source);