This question is locked. New answers and comments are not allowed.
I had the following XAML
Which when I had made a change to the first column (not shown) set the value of the Object and thus the PropertyName value... when I pressed Escape twice to undo the new row I got an exception in the generated domain service code (using Entity Framework) of
This EntitySet of Type 'propertyName' does not support the 'Edit' operation.
The value it is trying to set is null. Even with Mode=OneWay, and the IsReadOnly set on the GridViewDataColumn, it still trys to undo the changes back to the null (which was the starting value).
The way around this is to use a customised GridViewDataColumn with no CellEditTemplate.
Hope that helps someone, and it might even be a bug in the GridViewDataColumn? I'd expect a oneway binding, or even the IsReadOnly to not try to call the setter on the property?
<telerik:GridViewDataColumn Header="Title" DataMemberBinding="{Binding Path=Object.PropertyName, Mode=OneWay}" IsReadOnly="True" />Which when I had made a change to the first column (not shown) set the value of the Object and thus the PropertyName value... when I pressed Escape twice to undo the new row I got an exception in the generated domain service code (using Entity Framework) of
This EntitySet of Type 'propertyName' does not support the 'Edit' operation.
The value it is trying to set is null. Even with Mode=OneWay, and the IsReadOnly set on the GridViewDataColumn, it still trys to undo the changes back to the null (which was the starting value).
The way around this is to use a customised GridViewDataColumn with no CellEditTemplate.
<telerik:GridViewDataColumn Width="Auto" > <telerik:GridViewDataColumn.Header> <TextBlock TextWrapping="Wrap" Text="Title" /> </telerik:GridViewDataColumn.Header> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=Object.PropertyName, Mode=OneWay}" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate></telerik:GridViewDataColumn>Hope that helps someone, and it might even be a bug in the GridViewDataColumn? I'd expect a oneway binding, or even the IsReadOnly to not try to call the setter on the property?