Kendo UI CheckBoxGroup TagHelper CheckBoxGroupTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-checkboxgroup")]
[HtmlTargetElement("checkboxgroup-editor", ParentTag = "form-item")]
[HtmlTargetElement("checkboxgroup-editor", ParentTag = "property-grid-item")]
[RestrictChildren("kendo-checkboxgroup-items", new string[] { })]
public class CheckBoxGroupTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IKendoFormEditor
Inheritance: objectTagHelperTagHelperBaseCheckBoxGroupTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-checkboxgroup name="checkboxgroup">
<kendo-checkboxgroup-items>
<kendo-checkboxgroup-item value="1" label="Spain"></kendo-checkboxgroup-item>
<kendo-checkboxgroup-item value="2" label="Italy"></kendo-checkboxgroup-item>
<kendo-checkboxgroup-item value="3" label="UK"></kendo-checkboxgroup-item>
</kendo-checkboxgroup-items>
</kendo-checkboxgroup>
Child Tags
Constructors
Initializes a new instance of the CheckBoxGroupTagHelper class.
public CheckBoxGroupTagHelper(IKendoHtmlGenerator generator)
Properties
Defines an array of configuration objects to be rendered as checkboxes.
[HtmlAttributeName("bind-to")]
public IList<IInputGroupItem> BindTo { get; set; }
Sets the enabled state of all checkboxes in the CheckBoxGroup.
public bool? Enabled { get; set; }
An expression to be evaluated against the current model.
public ModelExpression For { get; set; }
The name attribute to be used for the checkbox inputs. If omitted, the id of the wrapper element will be used.
public string InputName { get; set; }
Sets a value controlling the border radius of the input.
public Rounded? InputRounded { get; set; }
Sets a value controlling the size of the input.
public ComponentSize? InputSize { get; set; }
IsNested member.
[HtmlAttributeNotBound]
public bool IsNested { get; set; }
Implements:
Specifies the label position according to its input for all items in the widget. Accepts "before" and "after".
public CheckBoxGroupLabelPosition? LabelPosition { get; set; }
Specifies whether the checkbox inputs will be rendered one below the other ("vertical") or on the same line ("horizontal").
public CheckBoxGroupLayout? Layout { get; set; }
The name of the JavaScript function that will handle the change event. Fires when checking or unchecking a checkbox in the widget through user interaction.
public string OnChange { get; set; }
The name of the JavaScript function that will handle the focus event. Fires when a checkbox in the CheckBoxGroup is focused through user interaction.
public string OnFocus { get; set; }
The name of the JavaScript function that will handle the select event. Fires when a checkbox input is clicked to be selected through user interaction. If prevented, the clicked input will not be checked/unchecked.
public string OnSelect { get; set; }
The selected (checked) checkbox values. Will also be used as a CheckBoxGroup widget value.
public IEnumerable<string> Value { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
TryAddAsEditor method.
public bool TryAddAsEditor(TagHelperContext context)
The result.
Implements:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: