Home › Forums › WPF controls › Xceed DataGrid for WPF › Adding a row
This is newbie question, but I can get insert row to work.
I have a list that extends ObservableCollection<T>. Everytime I try to add row it trhows an exception:
An attempt was made to add a new data item to a source that does not support insertion.
Could someone help please? I think I’m missing something simple.
Imported from legacy forums. Posted by Murthy (had 3380 views)
Your collection needs to implement IBindingList in order to support insertion.
Imported from legacy forums. Posted by Marcus [Xceed] (had 176 views)
Thank you that worked!
Imported from legacy forums. Posted by Murthy (had 239 views)
In my case, I need ObservableCollection. How to change code so I can insert into this collection type?
Imported from legacy forums. Posted by Dusan (had 381 views)
You will need to derive from ObservableCollection and implement the IBindingList interface.
Imported from legacy forums. Posted by Marcus [Xceed] (had 4485 views)