Posted 16 years ago
by jeff jarrell

I have a CustomDataFactory that I am using .SelectedObject(s) with. I understand the notion of DataFactoryOptions.ParentAccessor and have GetDataAccessors return null when the ParentAccessor is not null (my properties don't have properties).
I have a context where I am using I am using a SelectedItems collection of a DataGrid (Exceed). I push the update into the PropertyGrid.SelectedObject(s) when I get a NotifyCollectionChanged event.
As I multi-select items in the grid it works ok for a couple of items. Then past a certain selection count of items, I see redundant calls to the GetDataAccessors. It's on different threads because my GetDataAccessors isn't built to be threadsafe :).
The IEnumerable I was setting into PropertyGrid.SelectedObjects was an ObservableList and when I changed it to NOT be observable this seem to fix it up.
1)Does having .SelectedObjects set to an Observable have an impact?
By not using an Observable things work so long as things are moving slowly. Obviously, working off NotifyCollectionChange pushes too many updates into the PropertyGrid (which it then trys to spin up threads, which then blows up my non-thread safe Factory.
I can queue this up and control the update being pushed to the .SelectedObjects.
2) I do see the PropertyGrid.IsAsync property. What am I giving up if I turn this off?
3) In this DataGrid context where we are multi-selecting objects to push into the property grid I can see the need and the advantage of multiple threads, but how does the DataFactory distinguish one call from another (so that the objects can be distributed to different threads for Accessor building).
Thanks for any advice.
jeff
I have a context where I am using I am using a SelectedItems collection of a DataGrid (Exceed). I push the update into the PropertyGrid.SelectedObject(s) when I get a NotifyCollectionChanged event.
As I multi-select items in the grid it works ok for a couple of items. Then past a certain selection count of items, I see redundant calls to the GetDataAccessors. It's on different threads because my GetDataAccessors isn't built to be threadsafe :).
The IEnumerable I was setting into PropertyGrid.SelectedObjects was an ObservableList and when I changed it to NOT be observable this seem to fix it up.
1)Does having .SelectedObjects set to an Observable have an impact?
By not using an Observable things work so long as things are moving slowly. Obviously, working off NotifyCollectionChange pushes too many updates into the PropertyGrid (which it then trys to spin up threads, which then blows up my non-thread safe Factory.
I can queue this up and control the update being pushed to the .SelectedObjects.
2) I do see the PropertyGrid.IsAsync property. What am I giving up if I turn this off?
3) In this DataGrid context where we are multi-selecting objects to push into the property grid I can see the need and the advantage of multiple threads, but how does the DataFactory distinguish one call from another (so that the objects can be distributed to different threads for Accessor building).
Thanks for any advice.
jeff