Table of Contents

Class ListEditor<T>

Namespace
Dynamicweb.Content.Items.Editors
Assembly
Dynamicweb.dll
Represents a list editor.
public abstract class ListEditor<T> : Editor, IListEditor, IListTemplate

Type Parameters

T
Item value type.
Inheritance
ListEditor<T>
Implements
Inherited Members

Constructors

ListEditor()

Initializes a new instance of an object.
protected ListEditor()

Fields

MaxIconColumnsPerRow

protected const int MaxIconColumnsPerRow = 10

Field Value

int

Properties

DataType

Gets the data type for this editor.
public override Type DataType { get; }

Property Value

Type

EncodeValues

Gets or sets the flag is the values should be encoded in DB.
public virtual bool EncodeValues { get; set; }

Property Value

bool

Items

Gets or sets the editor items.
public IList<ListItem> Items { get; set; }

Property Value

IList<ListItem>

ItemTemplate

Gets or sets the item template
public virtual string ItemTemplate { get; set; }

Property Value

string

Mode

Gets the list mode.
public virtual ListEditorMode Mode { get; }

Property Value

ListEditorMode

SourceItems

Gets or sets the list items.
public IEnumerable<Item> SourceItems { get; set; }

Property Value

IEnumerable<Item>

Methods

BeginEdit(EditorContext)

Enables the editor to populate its UI to the client and initiate the editing process.
[Obsolete("Do not use")]
public override void BeginEdit(EditorContext context)

Parameters

context EditorContext
Editor context.

ConvertItemValueAs(Type, ListItem)

protected object ConvertItemValueAs(Type valueType, ListItem item)

Parameters

valueType Type
item ListItem

Returns

object

ConvertItemValueAsEnumerable(ListItem)

[Obsolete("Do not use")]
protected IEnumerable<object> ConvertItemValueAsEnumerable(ListItem item)

Parameters

item ListItem

Returns

IEnumerable<object>

ConvertItemValueAsString(ListItem)

[Obsolete("Do not use")]
protected string ConvertItemValueAsString(ListItem item)

Parameters

item ListItem

Returns

string

EndEdit()

Returns the edited value.
[Obsolete("Do not use")]
public override object EndEdit()

Returns

object
The edited value.

GetFullIconPath(string)

[Obsolete("Do not use")]
protected string GetFullIconPath(string path)

Parameters

path string

Returns

string

GetGenericType(object)

[Obsolete("Do not use")]
protected Type GetGenericType(object value)

Parameters

value object

Returns

Type

GetViewModel(object, ItemField, bool)

protected ListViewModel GetViewModel(object value, ItemField field, bool allowSorting)

Parameters

value object
field ItemField
allowSorting bool

Returns

ListViewModel

GetViewModelValue(object, ItemField)

Gets the model to use when rendering list viewmodels with included options- ListViewModel
public override object GetViewModelValue(object value, ItemField field)

Parameters

value object
Value
field ItemField
Field

Returns

object

IsItemSelected(Type, ListItem, IEnumerable<object>)

protected bool IsItemSelected(Type valueType, ListItem item, IEnumerable<object> selectedValues)

Parameters

valueType Type
item ListItem
selectedValues IEnumerable<object>

Returns

bool

RenderIconList(TextWriter, T, ListEditorMode, OptionLabelPosition, int, int, int, bool)

[Obsolete("Do not use")]
protected void RenderIconList(TextWriter output, T selectedItem, ListEditorMode listMode, OptionLabelPosition labelPosition, int iconPosition, int iconMaxWidth, int iconMaxHeight, bool allowSorting)

Parameters

output TextWriter
selectedItem T
listMode ListEditorMode
labelPosition OptionLabelPosition
iconPosition int
iconMaxWidth int
iconMaxHeight int
allowSorting bool

RenderItemListValue(string)

Render of the Item List value.
[Obsolete("Do not use")]
public override Editor.RenderedItemListResult RenderItemListValue(string value)

Parameters

value string
Value

Returns

Editor.RenderedItemListResult
Rendered Value

RenderItemTemplate(EditorContext, T)

[Obsolete("Do not use")]
protected bool RenderItemTemplate(EditorContext context, T selectedItem)

Parameters

context EditorContext
selectedItem T

Returns

bool

RenderList(EditorContext, T)

Renders list.
[Obsolete("Do not use")]
protected virtual void RenderList(EditorContext context, T selectedItem)

Parameters

context EditorContext
Editor context.
selectedItem T
Selected item.

RenderValue(EditorRenderingContext)

Renders value.
public override void RenderValue(EditorRenderingContext context)

Parameters

context EditorRenderingContext
Editor rendering context.

StringifyValue(object)

Returns string representation of editor value.
public override string StringifyValue(object value)

Parameters

value object
Editor value.

Returns

string
To top