Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

selected/not selected in Dynamic Property - value always inherited but should not be


I am having difficulty with a Dynamic Property using the selected / not selected control. It is used to hide a property if ticked.

If the property is ticked in one node, when I refer to a child of that not (in which it is not ticked) the value always comes back as true.

I have tried setting the root node to unticked and ticking the box to the left to force the value in all children as a kind of default value, but to no avail.


Any ideas?

Feb 23, 2011 17:24

that is actully by design....

Make yourself a property that is PropertyString, and use 1 for true, 0 for false

Feb 23, 2011 18:39

Exactly, it's by design. To elaborate, in case you wonder why it works this way: The checked/unchecked represents true/false and false is treated as null. A page inherits a dynamic property unless it is set to something not null on the page.

By using a string (which is stored as null if it is empty) with values "1" and "0" as Anders suggests you can have "0" override "1". Preferably you build a dropdown or radiobutton control to display the values "selected" "not selected" and "not set" instead of just a textbox. You can use the PropertySelectControlBase for that, or just go with the Dynamic list:

Feb 24, 2011 7:54

This makes sense, thank you.

It does show that the model does not really work for selected/not selected so really it should not be there?

I have used if (dp.InheritedPageLink.ID == 0) to get around it, as I had to implement something before I had read your replies. 



Feb 24, 2011 14:17
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.