Class MultiSelectorFormComponent<TProperties>
Represents a component with multiple options which can be selected simultaneously.
public abstract class MultiSelectorFormComponent<TProperties> : FormComponent<TProperties, string> where TProperties : MultiSelectorProperties, new()
Type Parameters
TProperties
- Inheritance
-
objectFormComponent<TProperties, string>MultiSelectorFormComponent<TProperties>
- Derived
- Inherited Members
- Extension Methods
Properties
HtmlOptions
Gets or sets the collection of items populated in the component.
public List<HtmlOptionItem> HtmlOptions { get; set; }
Property Value
- List<HtmlOptionItem>
LabelForPropertyName
Gets name of the Kentico.Content.Web.Mvc.MultiSelectorFormComponent<TProperties>.SelectedValues property.
public override string LabelForPropertyName { get; }
Property Value
- string
Methods
GetHtmlOptions()
Returns collection of items populated in component.
protected virtual IEnumerable<HtmlOptionItem> GetHtmlOptions()
Returns
- IEnumerable<HtmlOptionItem>
GetValue()
Gets the value of the form component.
public override string GetValue()
Returns
- string
SetValue(string)
Sets the Kentico.Content.Web.Mvc.MultiSelectorFormComponent<TProperties>.SelectedValues property.
public override void SetValue(string value)
Parameters
value
stringValue to be set.
Validate(ValidationContext)
Performs validation on Kentico.Content.Web.Mvc.MultiSelectorFormComponent<TProperties>.SelectedValues property checking whether such values are present in HtmlOptions.
public override IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Parameters
validationContext
ValidationContextThe validation context.
Returns
- IEnumerable<ValidationResult>
Collection holding validation results.