Possible Duplicate:
How to add or remove an item from a CollectionViewSource?
I have a datagrid that is bound to a CollectionViewSource . how can I add newItem to this source using code ?
Possible Duplicate:
How to add or remove an item from a CollectionViewSource?
I have a datagrid that is bound to a CollectionViewSource . how can I add newItem to this source using code ?
I Just read the MSDN documentation. It says
You should not create objects of this class in your code. To create a collection view for a collection that only implements IEnumerable, create a CollectionViewSource object, add your collection to the Source property, and get the collection view from the View property.
So, I guess you should not be adding any items to a CollectionViewSource. Instead you should add items to the wrapping object.
Why do you need to do this anyway, what are you trying to achieve?