Unplanned
Last Updated: 05 Feb 2024 12:06 by ADMIN
Created by: Stuart
Comments: 0
Category: TreeView
Type: Bug Report
3

### Bug report

The attributes set through the "HtmlAttributes", "ContentHtmlAttributes", and "LinkHtmlAttributes"methods are not applied to the TreeView items.

### Reproduction of the problem

1. Create a TreeView and set attributes by using the "HtmlAttributes", "ContentHtmlAttributes", "LinkHtmlAttributes"methods:

@(Html.Kendo().TreeView()
    .Name("treeview-kendo2")
    .Items(treeview =>
    {
        treeview.Add().Text("My Documents")
        .SpriteCssClasses("k-icon k-i-globe")
        .Expanded(true)
        .Url("/")
        .HtmlAttributes(new { @class = "fairydust1" })
        .ContentHtmlAttributes(new { data_navigate = "navigate_content", @class = "trigger", title = "content_title" })
        .LinkHtmlAttributes(new { data_navigate = "navigate_link", @class = "trigger", title = "content_link" });
    })
)

2. Run the page and inspect the TreeView item.

### Expected/desired behavior

The attributes are serialized and rendered.

### Environment

* **Kendo UI version: 2021.2.616
* **jQuery version: 1.12.4
* **Browser: [all]

Unplanned
Last Updated: 19 Sep 2023 14:31 by Lara

Bug report

When a TreeView is bound to a new kendo.data.HierarchicalDataSource the binding of the widget breaks.

Reproduction of the problem

  1. Run this Dojo
  2. Notice that when the new DataSource is set the expand icon of the parent disappears.

In the wrappers the following error is thrown:
Uncaught TypeError: Cannot read properties of undefined (reading 'length')

Review the behavior in this Telerik Core REPL.

Expected/desired behavior

The TreeView should bind to the new data set successfully.

Environment

  • Kendo UI version: 2023.2.829
  • Browser: [all]