Class ListEditor<T>
- Namespace
- Dynamicweb.Content.Items.Editors
- Assembly
- Dynamicweb.dll
Represents a list editor.
public abstract class ListEditor<T> : Editor, IListEditor, IListTemplate, IListBaseEditor
Type Parameters
T
Item value type.
- Inheritance
-
ListEditor<T>
- Implements
- Derived
- Inherited Members
Constructors
ListEditor()
Initializes a new instance of an object.
protected ListEditor()
Fields
MaxIconColumnsPerRow
protected const int MaxIconColumnsPerRow = 10
Field Value
Properties
DataType
Gets the data type for this editor.
public override Type DataType { get; }
Property Value
ItemTemplate
Gets or sets the item template
public virtual string ItemTemplate { get; set; }
Property Value
Items
Gets or sets the editor items.
public IList<ListItem> Items { get; set; }
Property Value
Mode
Gets the list mode.
public virtual ListEditorMode Mode { get; }
Property Value
SourceItems
Gets or sets the list items.
public IEnumerable<Item> SourceItems { get; set; }
Property Value
Methods
ConvertValueToList(object)
public List<object> ConvertValueToList(object value)
Parameters
value
object
Returns
GetListEditorViewModel(object, ItemField)
public ListEditorViewModel<T> GetListEditorViewModel(object value, ItemField field)
Parameters
Returns
GetViewModel(object, ItemField, bool)
protected ListViewModel GetViewModel(object value, ItemField field, bool allowSorting)
Parameters
Returns
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
Returns
IsItemSelected(IEnumerable<object>, FieldOptionMetadata)
public bool IsItemSelected(IEnumerable<object> selectedValues, FieldOptionMetadata option)
Parameters
selectedValues
IEnumerable<object>option
FieldOptionMetadata
Returns
RenderValue(EditorRenderingContext)
Renders value.
public override void RenderValue(EditorRenderingContext context)
Parameters
context
EditorRenderingContextEditor rendering context.
StringifyValue(object)
Returns string representation of editor value.
public override string StringifyValue(object value)
Parameters
value
objectEditor value.