View previous topic :: View next topic |
Author |
Message |
EntityDev
Joined: 07 Apr 2016 Posts: 40
|
Posted: Sun Apr 10, 2016 8:23 pm Post subject: ChildProperty and ParentProperty Scope |
|
|
I didn't want to pack all my questions into the Evaluation thread, so am creating these separately.
My business entities inherit from a base class.
When I add a new ObjectBinding, the ChildProperty and ParentProperty lists only contain the properties in the base class.
Is this by design? I note that I can manually type in the property name and it is recognized at run-time.
Thanks once again. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Apr 10, 2016 11:33 pm Post subject: |
|
|
The Virtual Tree editor will only display properties that belong to the TypeName that you have specified for the binding - have you specified the base class in the TypeName? At runtime it binds dynamically to the actual object property and so can resolve the property names. _________________ Infralution Support |
|
Back to top |
|
|
EntityDev
Joined: 07 Apr 2016 Posts: 40
|
Posted: Mon Apr 11, 2016 10:56 am Post subject: |
|
|
No, I didn't bind to the base class. I suppose that within the Entity Framework generated code, something confuses the VirtualTree. I'll create hand-rolled entities with inheritance and test them. |
|
Back to top |
|
|
EntityDev
Joined: 07 Apr 2016 Posts: 40
|
Posted: Mon Apr 11, 2016 2:11 pm Post subject: |
|
|
I tested with handwritten classes here at the office and the tree does indeed list all properties in both the base and inherited classes, in the ChildProperty and ParentProperty comboboxes, in the editor.
I'll look closely at my environment at home. Obviously, something is amiss.
Thank you. |
|
Back to top |
|
|
|