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

Aug 27, 2009 at 4: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.

Thanks.

Nov 30, 2009 at 9: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();