Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Use non-deafult setting for DropDownList?


I have several settings defined for DropDownList (Admin/Config/Edit custom property types/Drop-down list).

I also have a couple of properties that are supposed to get their values from these different settings, but I am only able to get the values from the setting that is set as default.

            Name = "Zoom",
            Description = "",
            GroupName = "Maps",
            Order = 310)]
        public virtual string BigZoom { get; set; }

Is there a way to specify which setting a DropDownList property should use?

Oct 03, 2013 14:41

Administrative view->Page/Block type->Select your type->Select the property->Custom Settings tab->Select "Use custom settings" and then create your settings.

Oct 03, 2013 17:25

You can also select a global setting other than the one marked as default in the last step instead of creating a custom setting. This is a good option if you want to reuse these settings among different settings.

Oct 03, 2013 17:27

Thanks for a quick answer. But, there I find "This class does not have any custom settings." Am I using the wrong propertytype? I'm using "string" with [UIHint("DropDownList")] in my typed page definition as seen in the code above.

Oct 04, 2013 8:02

What kind of PropertyType does your admin mode say your Property is?

Oct 04, 2013 9:16

Long String (>255)

Oct 04, 2013 9:18

Since UIHint does not affect the property being used and property settings are connected to the actual property type you need to redefine the backing type to be able to get access to property settings. This can be done by the following code:

public virtual string DynamicList { get; set; }

Oct 04, 2013 9:38

Linus, Is the idea that when we want to create custom PropertySettings we use the old Custom Properties and the PropertySettingsAttribute on a PropertyControl or are there any new way to add PropertySettings to a Property / EditorDescriptor?

Oct 04, 2013 10:13

Well, actually we wanted to add support to be able to define property settings directly on the property using an attribute. But we have to drop/postpone this due to time constraints.


Property settings are still defined on the backing property type(classes deriving from PropertyData) which is a bit unfortunate since we want to move away from partners using this layer directly. So for now, you still need to create a class deriving from PropertyData if you want to use property settings and use the BackingType attribute if your value type is the same as one of the built in properties (string, int, XhtmlString etc.). This will not change with the 7.5 release but I hope that we can simplify this for the future.

Oct 04, 2013 10:30

Thank you for your help!

Oct 04, 2013 10:34
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.