'EditItem' is not allowed for this view - Error when Filtering

Aug 27, 2009 at 5:49 PM

I am getting this error: 'EditItem' is not allowed for this view.

It goes to the parent Window right there: dialog.ShowDialog();

It happens when I try to filter an ObservableCollection:

contractApartments.ItemsSource = contractApartmentCollecion.Where(w => w.Dorm.Equals((dormsGrid.SelectedItem as SelectedDorm).Dorm));

It is fine when I just do this:

contractApartments.ItemsSource = contractApartmentCollecion;

The same happens if I try to use OrderBy.

I appreciate your help.


Nov 30, 2009 at 10:51 PM

I've been getting this error too. Convert the query to a list and it should solve the error.

(contractApartmentCollecion.Where(w => w.Dorm.Equals((dormsGrid.SelectedItem as SelectedDorm).Dorm))).ToList();