ButtonGroupTagHelper
Kendo UI ButtonGroup TagHelper ButtonGroupTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-buttongroup")]
[RestrictChildren("buttongroup-items", new string[] { })]
[OutputElementHint("div")]
public class ButtonGroupTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperBaseButtonGroupTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-buttongroup name="select-period">
<buttongroup-items>
<item text="Month"></item>
<item text="Quarter"></item>
<item text="Year"></item>
</buttongroup-items>
</kendo-buttongroup>
Child Tags
Constructors
Initializes a new instance of the ButtonGroupTagHelper class.
public ButtonGroupTagHelper(IKendoHtmlGenerator generator)
Properties
Defines if the widget is initially enabled or disabled. By default, it is enabled.
public bool? Enable { get; set; }
Sets a value controlling how the color is applied.
public ButtonFillMode? FillMode { get; set; }
Defines the initially selected Button (zero based index).
public double? Index { get; set; }
The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the ButtonGroup is focused.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnKendoKeydown { get; set; }
The name of the JavaScript function that will handle the select event. Fires when a Button is selected.
public string OnSelect { get; set; }
Defines the selection type. Allows the following values: single (default): allows only a single button to be the currently selected in the group.; multiple: allows multiple buttons to be selected in the group at the same time. or none: does not allow selection. ButtonGroups acts as a group of clickable Buttons..
public string Selection { get; set; }
Sets the size of the component.
public ComponentSize? Size { get; set; }
Sets the color of the component according to the applied theme.
public ThemeColor? ThemeColor { 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:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: