Home Forums WPF controls Xceed DataGrid for WPF Adding a row

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23578 |

    Hello,

    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.

    Thanks

    Imported from legacy forums. Posted by Murthy (had 3380 views)

    Xceed Support
    Member
    Post count: 5658

    Your collection needs to implement IBindingList in order to support insertion.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 176 views)

    User (Old forums)
    Member
    Post count: 23064

    Thank you that worked!

    Imported from legacy forums. Posted by Murthy (had 239 views)

    User (Old forums)
    Member
    Post count: 23064

    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)

    Xceed Support
    Member
    Post count: 5658

    You will need to derive from ObservableCollection and implement the IBindingList interface.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 4485 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.