My question is - how can I programatically determine if a specific dynamic property har been explicitly set for the current page or if the value has been inherited from an ancestor. What I would like is something like a IsInherited-property of the PropertyData-class, which of course does not exist.
Any workaround-suggestions would be much appreciated. Of course, I could always solve this with a tailored stored procedure, but I wouldn't mind a built-in-method-solution if there is one.
regards
/Christopher Bergren, Guide Stockholm
Hi Christopher,
On the DynamicProperty class there is a property:
public DynamicPropertyStatus Status {get;}
DynamicPropertyStatus is an enum which may take the following values:
Undefined - The dynamic property has no definition on this page or any of its parents, i e completely undefined.
Defined - The dynamic property is defined on this page.
Inherited - The dynamic property is defined on one of the parents of this page and the value is inherited by this page.
That's about all the information in the SDK, however that should give you what you need.
Regards,
Andy