Posted 14 years ago
by jeff jarrell
I am looking to add new properties to the propertygrid from a custom editor. the new properties are not necessarily part of a collection that is the current property.
I am using a custom data factory as well as our own implementation of IPropertyDataAccessor. I use SelectedObject, SelectedObjects. I don't want to refresh via SelectedObject,SelectedObjects to see the new properties. It would seem like getting these events going would do the trick.
Questions
1) How do I get this all started? If I set CollectionDisplayMode="EditableInline"
now I get the little plus sign, that gets it going, but it may not be the right visual treatment for the custom editor.
2) When I click the + sign, I get a call to the IPropertyDataAccessor.CanAddChild which I return true.
3) Next it goes to IPropertyDataAccessor.AddChild. If the current property is a collection I would presume add an element to the current item. I would then expect a call to the datafactory. But if it's not a collection, then add child to what?
Considering we are in the "data layer" it wouldn't seem exactly seem right to add it to the IPropertyAccessor, or is it?
Any help appreciated.
Thanks,
jeff
I am using a custom data factory as well as our own implementation of IPropertyDataAccessor. I use SelectedObject, SelectedObjects. I don't want to refresh via SelectedObject,SelectedObjects to see the new properties. It would seem like getting these events going would do the trick.
Questions
1) How do I get this all started? If I set CollectionDisplayMode="EditableInline"
now I get the little plus sign, that gets it going, but it may not be the right visual treatment for the custom editor.
2) When I click the + sign, I get a call to the IPropertyDataAccessor.CanAddChild which I return true.
3) Next it goes to IPropertyDataAccessor.AddChild. If the current property is a collection I would presume add an element to the current item. I would then expect a call to the datafactory. But if it's not a collection, then add child to what?
Considering we are in the "data layer" it wouldn't seem exactly seem right to add it to the IPropertyAccessor, or is it?
Any help appreciated.
Thanks,
jeff