Class PropertyDataControlAdapter
Base class that is used to implement control adapters for controls deriving from PropertyDataControl.
Inheritance
Implements
Namespace: EPiServer.Web.PropertyControls.Adapters
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public abstract class PropertyDataControlAdapter : WebControlAdapter, IPropertyControl
Constructors
PropertyDataControlAdapter()
Initializes a new instance of the PropertyDataControlAdapter class.
Declaration
public PropertyDataControlAdapter()
Remarks
The default constructor is needed by the framework to create the adapter.
Properties
DisplayEditUI
Gets a value indicating whether the control should display an edit user interface.
Declaration
public virtual bool DisplayEditUI { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Enabled
Gets or sets a value indicating whether this IPropertyControl is enabled.
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Name
Gets the name of the property.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The name of the property. |
Properties
Sets the properties that are being edited for the IPropertyControl.
Declaration
public PropertyDataCollection Properties { get; set; }
Property Value
Type | Description |
---|---|
PropertyDataCollection |
PropertyData
Gets or sets the PropertyData for the IPropertyControl.
Declaration
public PropertyData PropertyData { get; set; }
Property Value
Type | Description |
---|---|
PropertyData | The PropertyData that is to be displayed or edited. |
PropertyDataControl
Gets the PropertyDataControl for this adapter.
Declaration
protected PropertyDataControl PropertyDataControl { get; }
Property Value
Type | Description |
---|---|
PropertyDataControl | The PropertyDataControl for this adapter. |
RenderType
Sets the RenderType for the IPropertyControl.
Declaration
public RenderType RenderType { get; set; }
Property Value
Type | Description |
---|---|
RenderType | A RenderType that is used to specify how the PropertyDataControl should be rendered. |
RowLayout
Specifies how a property row is rendered in the edit user interface.
Declaration
public virtual TableRowLayout RowLayout { get; }
Property Value
Type | Description |
---|---|
TableRowLayout | One of the values defined in TableRowLayout. |
SupportsOnPageEdit
Gets a value indicating whether this control supports "on page edit".
Declaration
public virtual bool SupportsOnPageEdit { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
If this property returns false CreateDefaultControls() will be called instead of CreateOnPageEditControls() when in "on page edit" mode.
ValidationGroup
Gets or sets the validation group.
Declaration
public string ValidationGroup { get; set; }
Property Value
Type | Description |
---|---|
System.String | The validation group. |
Methods
ApplyChanges()
Applies changes for the posted data to the page's properties.
Declaration
public virtual void ApplyChanges()
ApplyEditChanges()
Applies changes for the posted data to the page's properties when the RenderType property is set to Edit.
Declaration
public virtual void ApplyEditChanges()
Remarks
This method is called from ApplyChanges().
CreateChildControls()
Creates the target-specific child controls for a composite control.
Declaration
protected override void CreateChildControls()
CreateDefaultControls()
Creates the default controls for the property. Used when the property is in view mode or in "on page edit" mode and the adapter does not support on page editing.
Declaration
public virtual void CreateDefaultControls()
CreateEditControls()
Creates an edit interface for the property.
Declaration
public virtual void CreateEditControls()
Remarks
This is only valid for web form based editors.
CreateOnPageEditControls()
Creates the "on page edit" controls.
Declaration
public virtual void CreateOnPageEditControls()
SetupControl()
This method is not used for PropertyDataControlAdapter as it is called directly for the PropertyDataControl.
Declaration
public virtual void SetupControl()
SetValue(Object)
Sets a given value to the current PropertyData object.
Declaration
protected virtual void SetValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to be set. |
Remarks
This is only valid for web form based editors.
ShouldCreateDefaultControls()
If CreateDefaultControls() should be called.
Declaration
protected virtual bool ShouldCreateDefaultControls()
Returns
Type | Description |
---|---|
System.Boolean | True if CreateDefaultControls() should be called. |
Remarks
Default implementation checks the IsNull property on PropertyData.
ToWebString()
Get the web string representation of the property's value, on properties that do not use the editor this string will not contain any markup characters.
Declaration
public virtual string ToWebString()
Returns
Type | Description |
---|---|
System.String |
TranslateDisplayName()
Gets the translated display name of the property.
Declaration
public string TranslateDisplayName()
Returns
Type | Description |
---|---|
System.String | The translated display name of the property. |
Remarks
This is only valid for web form based editors.