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
Properties
DataType
Gets the data type for this editor.
public override Type DataType { get; }
Property Value
EncodeValues
Gets or sets the flag is the values should be encoded in DB.
public virtual bool EncodeValues { get; set; }
Property Value
Items
Gets or sets the editor items.
public IList<ListItem> Items { get; set; }
Property Value
ItemTemplate
Gets or sets the item template
public virtual string ItemTemplate { 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
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
Returns
ConvertItemValueAsEnumerable(ListItem)
[Obsolete("Do not use")]
protected IEnumerable<object> ConvertItemValueAsEnumerable(ListItem item)
Parameters
item
ListItem
Returns
ConvertItemValueAsString(ListItem)
[Obsolete("Do not use")]
protected string ConvertItemValueAsString(ListItem item)
Parameters
item
ListItem
Returns
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
GetGenericType(object)
[Obsolete("Do not use")]
protected Type GetGenericType(object value)
Parameters
value
object
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(Type, ListItem, IEnumerable<object>)
protected bool IsItemSelected(Type valueType, ListItem item, IEnumerable<object> selectedValues)
Parameters
valueType
Typeitem
ListItemselectedValues
IEnumerable<object>
Returns
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
TextWriterselectedItem
TlistMode
ListEditorModelabelPosition
OptionLabelPositioniconPosition
inticonMaxWidth
inticonMaxHeight
intallowSorting
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
EditorContextselectedItem
T
Returns
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.