Im currently trying to bind the DataGrid.ItemsSource to a custom RowCollection, which implements IList and INotifyCollectionChanged:
Public Class RowCollection(of T)
Implements IList(Of T)
Implements INotifyCollectionChanged
Private _List As New List(Of T)
...
(Sorry for the VB code, I'll be translating all my code to C# soon.)
Notice the class does not derive from any existing CLR collection. I created my own class because I need to override GetItemAt, in order to implement record paging.
The Collection Internally adds and removes objects from its own private List _List
.
Now, I am able to view the items in a DataGrid, but as soon as I double click a cell to edit, I recieve an InvalidOperationException: 'EditItems' is not available..
My question is, what other interfaces should I implement in order to make my collection fully compatible with DataGrid?
Here you can read the following:
The IEditableObject interface is here Also see IEditableCollectionView here