Merging, Implementing\Inheriting DataFactory\IDataFactory

Grids for WPF Forum

Posted 15 years ago by jeff jarrell
Avatar
Following up from post.

Based on that thread I am override the IList<IDataAccessor> GetDataAccessors(object[] values method to get the categories arranged just right and attaching my ProperyDataAccessors to the right category. (Option #3 in prior thread). In the return of the IList<IDataAccessor> i only to return the topmost category because all of the other properties and categories are attached via the DataAccessorCollection on the root category. (we always have a root category. This is working ok. I am implementing ICategoryDataAccessor and IPropertyDataAccessor.

I have worked on inheriting DataFactory and when I selected two objects via .SelectedObjects I am not getting merging. I don't get a call to the IsMergable on the IPropertyDataAccessor.

When inheriting datafactory is the merging something that I have to take care of?

Thanks,
jeff

Comments (2)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jeff,

The merging is performed by GetProperties(object[], DataFactoryOptions). So for multiple objects there are three steps.

1. Get the properties of all the objects, which is performed by GetProperties(object, DataFactoryOptions).
2. Merge common properties and discard others, which is performed by GetProperties(object[], DataFactoryOptions).
3. Categorize properties, which is performed by GetDataAccessors(object[], DataFactoryOptions).

If you don't call the default implementations for any of those steps, then you would have to build that logic yourself. For #2, you can reuse MergedPropertyDataAccessor as you see fit (which is what our code uses).

From what it sounds like, you should be overriding #1 and #3, but it's hard to tell without knowing all the details. If you have a small sample project you can send over to our support address, then we can take a look.


Actipro Software Support

Posted 15 years ago by jeff jarrell
Avatar
That's pretty much what I expected. Thanks.
The latest build of this product (v24.1.3) was released 28 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.