I have a scenario where the ItemsSource of a RadGridView (an ObservableCollection of view model objects) can change based on filter data. My problem is that if there are any validation errors (using IDataErrorInfo on the object bound to the column DataMemberBinding) in the grid at the time the underlying collection is updated the grid fails to refresh. I've even tried clearing all the errors in the view models before clearing the collection but the grid doesn't seem to pick up on the events that are fired as a result. This happens regardless of what I set the ValidatesOnDataErrors
option to.
It looks to me like the grid only updates its internal state when the field exits edit mode and doesn't respond to the IDataErrorInfo events at all. Is this by design? If ValidatesOnDataErrors is set to InEditMode it also won't allow focus to leave the cell at all which is also a problem.
Is the failing to refresh from the ItemsSource if any validation errors exist also by design? If not does anyone know of a possible workaround? Can I manually clear the errors from the control itself? I'm trying to keep to MVVM so I'd prefer not to have to do that. Maybe there's a way to get it to requery the underlying collection?
The way errors are rendered visually when using this mechanism is really nice so I'd like to use it if possible.
It looks to me like the grid only updates its internal state when the field exits edit mode and doesn't respond to the IDataErrorInfo events at all. Is this by design? If ValidatesOnDataErrors is set to InEditMode it also won't allow focus to leave the cell at all which is also a problem.
Is the failing to refresh from the ItemsSource if any validation errors exist also by design? If not does anyone know of a possible workaround? Can I manually clear the errors from the control itself? I'm trying to keep to MVVM so I'd prefer not to have to do that. Maybe there's a way to get it to requery the underlying collection?
The way errors are rendered visually when using this mechanism is really nice so I'd like to use it if possible.