RadioGroupTagHelper
Kendo UI RadioGroup TagHelper RadioGroupTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-radiogroup")]
[HtmlTargetElement("radiogroup-editor", ParentTag = "form-item")]
[HtmlTargetElement("radiogroup-editor", ParentTag = "property-grid-item")]
[RestrictChildren("kendo-radiogroup-items", new string[] { })]
public class RadioGroupTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IKendoFormEditor
Inheritance: objectTagHelperTagHelperBaseRadioGroupTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-radiogroup name="radiogroup"
radio-name="radiogroup"
value="1">
<kendo-radiogroup-items>
<kendo-radiogroup-item label="Spain" value="1"></kendo-radiogroup-item>
<kendo-radiogroup-item label="Italy" value="2"></kendo-radiogroup-item>
<kendo-radiogroup-item label="UK" value="3"></kendo-radiogroup-item>
</kendo-radiogroup-items>
</kendo-radiogroup>
Child Tags
Constructors
Initializes a new instance of the RadioGroupTagHelper class.
public RadioGroupTagHelper(IKendoHtmlGenerator generator)
Properties
Defines an array of configuration objects to be rendered as radio button.
[HtmlAttributeName("bind-to")]
public IList<IInputGroupItem> BindTo { get; set; }
Sets the enabled state of all radio buttons in the RadioGroup.
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 radio inputs. If omitted, the id of the wrapper element will be used.
public string InputName { 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 radio button for all items in the widget. Accepts "before" and "after".
public RadioGroupLabelPosition? LabelPosition { get; set; }
Specifies whether the radio buttons will be rendered one below the other ("vertical") or on the same line ("horizontal").
public RadioGroupLayout? Layout { get; set; }
The name of the JavaScript function that will handle the change event. Fires when the selected radio input in the RadioGroup is changed through user interaction.
public string OnChange { get; set; }
The name of the JavaScript function that will handle the focus event. Fires when a radio input in the RadioGroup 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 radio input is clicked to be selected through user interaction. If prevented, the clicked input will not be selected.
public string OnSelect { 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: