Hi, I am trying to do data binding in WPF on data grid using a cutom list. My custom list class contains a private data list of type List. I can not expose this list however the indexers are exposed for seeting and getting individual items. My custom class looks like this:
public abstract class TestElementList<T> : IEnumerable
where T : class
{
protected List<T> Data { get; set; }
public virtual T Get(int index)
{
T item = Data[index];
return item;
}
public virtual void Set(int index, T item)
{
Data[index] = item;
}
...
}
The data is binded but when I try to edit it, i get "'EditItem' is not allowed for this view." Error. On doing extensive searching over web, I found that i might need to implement IEditableCollectionView interface also. Can anybody please help me to either give pointers on how to implement this interface or any suggest any other better way to do databinding on custom list.
Thanks in advance.