I have a DataGrid. It's ItemsSource is bound to the ModelView's CompositeCollection through the ViewModel. The CompositeCollection consists of 2 ObservableCollections.
The display on the grid is fine. I am able to see the collection. However, when I try to edit one of the rows, I get a crash (NotSupportedException) of: "'EditItem' is not allowed for this view"
How do I make the rows editable? I need to be able to edit the ModelViews representing each row in the Grid.
Here is the CompositeCollection Property code that I use to bind to the itemssource: this isn't the exact code since I am not allowed to post the exact code but it is the same logic on how I make the collection
public CompositeCollection ModelViewsCollection { get { CollectionContainer modelViewContainer;
CompositeCollection modelViewCollection = new CompositeCollection();
modelViewContainer= new CollectionContainer();
modelViewContainer.Collection= this.ModelViewCollection;
modelViewCollection .Add(modelViewContainer);
modelViewContainer= new CollectionContainer(); modelViewContainer.Collection= this.ModelViewCollection2; modelViewCollection .Add(modelViewContainer);
return modelViewCollection;
}
}