November Happy Hour will be moved to Thursday December 5th.

Class PropertyEnumSelectControl

Displays a drop down list for selection of enum values.

Inheritance
System.Object
PropertyEnumSelectControl
Implements
System.Web.UI.INamingContainer
Inherited Members
Namespace: EPiServer.Web.PropertyControls
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public class PropertyEnumSelectControl : PropertySelectControlBase, IPropertyControl, INamingContainer, IRenderSettings

Constructors

PropertyEnumSelectControl()

Initializes a new instance of the PropertyEnumSelectControl class.

Declaration
protected PropertyEnumSelectControl()

PropertyEnumSelectControl(Type)

Initializes a new instance of the PropertyEnumSelectControl class.

Declaration
public PropertyEnumSelectControl(Type enumType)
Parameters
Type Name Description
System.Type enumType

The type of the enum that you want to display values for.

PropertyEnumSelectControl(Type, String, Boolean)

Initializes a new instance of the PropertyEnumSelectControl class.

Declaration
public PropertyEnumSelectControl(Type enumType, string translatePrefix, bool autoGenerateEmptyValue)
Parameters
Type Name Description
System.Type enumType

The type of the enum that you want to display values for.

System.String translatePrefix

The translate prefix.

System.Boolean autoGenerateEmptyValue

if set to true to auto generate an empty value.

Properties

EnumType

The type of enum to choose among with this property control.

Declaration
public Type EnumType { get; set; }
Property Value
Type Description
System.Type

Number

Gets or sets the numeric representation of the enum type.

Declaration
public int Number { get; set; }
Property Value
Type Description
System.Int32

The numeric representation of the enum type.

TranslatePrefix

Setting this property causes the text representation of the enum value to be looked up from translation. E.g. assigning it to "/myproperty/" will result in a lookup for "/myproperty/mylowercaseenumname".

Declaration
public string TranslatePrefix { get; set; }
Property Value
Type Description
System.String

Methods

SetupEditControls()

Used to apply a custom setup to the edit controls.

Declaration
protected override void SetupEditControls()
Overrides
Remarks

This method is called from CreateEditControls after the edit control(s) have been created.

ToWebString()

Returns the name of the selected value.

Declaration
public override string ToWebString()
Returns
Type Description
System.String

The name of the selected value.

Overrides
Remarks

Returns either the name of the selected enum value or a translation for this if it exists.

Implements

System.Web.UI.INamingContainer

Extension Methods