We encountered a problem with IsReadOnly and the collection changed event in the DataObjects.
- Bind an ObservableCollection to the DataObjects with an object within and IsReadOnly set to false (Default value).
- Change IsReadOnly to true
- Remove/Add an object in the ObservableCollection
- The property grid refreshes but the request payload still has IsReadOnly set to false since the collection changed event does not trigger an update of IsReadonly in the request or invalidate it.
We did manage to fix the problem (after looking at the code) by listening to any collection changed in the DataObjects and using reflection to call the private InvalidateRequestPayload of the PropertyGrid to rebuild it with the correct IsReadOnly value.
Indeed the OnDataObjectsCollectionChanged called only RequestRefresh.