New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI TreeViewItem TagHelper TreeViewItemTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("treeview-item", ParentTag = "items", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("items", new string[] { "icon" })]
[SuppressTagRendering]
public class TreeViewItemTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseTreeViewItemTagHelper

Implements: ITagHelperITagHelperComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-treeview name="treeview">
    <items>
        <treeview-item text="Checked Item" checked="true"></treeview-item>
    </items>
</kendo-treeview>

Child Tagsiconitems

Constructors

Initializes a new instance of the TreeViewItemTagHelper class.

C#
public TreeViewItemTagHelper()

Properties

Specifies whether the item is initially checked. True by default.

C#
public bool? Checked { get; set; }

Specifies the attributes added to the content element of the item.

C#
public IDictionary<string, object> ContentHtmlAttributes { get; set; }

Specifies whether the item is initially enabled. True by default.

C#
public bool? Enabled { get; set; }

Specifies whether the item is initially expanded

C#
public bool? Expanded { get; set; }

Specifies the attributes added to the item

C#
public IDictionary<string, object> HtmlAttributes { get; set; }

Specifies the icon of the item

C#
public string Icon { get; set; }

Specifies the data-id attribute of the item

C#
public string Id { get; set; }

Specifies the attributes added to the item's image.

C#
public IDictionary<string, object> ImageHtmlAttributes { get; set; }

Specifies the URL of the image displayed by the item

C#
public string ImageUrl { get; set; }

Specifies the attributes added to the item's element

C#
public IDictionary<string, object> LinkHtmlAttributes { get; set; }

Specifies whether the item is initially selected

C#
public bool? Selected { get; set; }

Specifies the class name for the sprite image displayed by the item

C#
public string SpriteCssClass { get; set; }

Specifies the text displayed by the item

C#
public string Text { get; set; }

Specifies the URL that the item will link to. Used for navigational trees.

C#
public string Url { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>