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

Kendo UI DropDownTreeItem TagHelper DropDownTreeItemTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

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

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseDropDownTreeItemTagHelper

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-dropdowntree name="dropdowntree">
    <items>
        <dropdowntree-item text="Item 1" checked="true"></dropdowntree-item>
    </items>
</kendo-dropdowntree>

Child Tagsitems

Constructors

Initializes a new instance of the DropDownTreeItemTagHelper class.

C#
public DropDownTreeItemTagHelper()

Properties

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

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

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

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

Specifies whether the items text should be encoded.

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

Specifies whether the item is initially expanded

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

Specifies whether the item has children

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

The HTML attributes of the item that is rendered for the node.

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

Specifies the id of the item

C#
public string Id { get; set; }

Specifies the URL of the image displayed by the item

C#
public string ImageUrl { 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; }

Specifies the text displayed by the item

C#
public string Value { 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>