kendo-uitelerikkendo-asp.net-mvckendo-treeview

Kendo MVC TreeView not rendering ".k-in" items correctly


We're using Kendo UI MVC 2019.2.619 in our MVC5 project.

Our TreeView is rendering like this:

enter image description here

We took a look at the HTML it's generating at our end

enter image description here

But it should look like this

enter image description here

(Source: https://www.telerik.com/forums/k--items)

This is how we generate our TreeView.

@(Html.Kendo().TreeView()
                                  .Name("BroadcastTreeView")
                                  .DataTextField("Text")
                                  .DataSource(dataSource => dataSource
                                      .Model(model => model
                                          .Id("Id")
                                          .HasChildren("HasChildren")
                                          .Children("Items"))
                                      .Read(read => read.Type(HttpVerbs.Post).Action("ReadTree", "Broadcast").Data("treeViewReadData"))
                                      .Events(events => events.RequestEnd("onRequestEnd")))
                                  .Messages(msg => msg
                                      .Loading("Data ophalen...")
                                      .RequestFailed("Kan data niet ophalen")
                                      .Retry("Probeer opnieuw"))
                                  .Events(events => events
                                      .Change("onTreeViewChange")
                                      .Expand("onTreeViewExpand"))
                                  .HtmlAttributes(new { @class = "custom-border" }))

When we drag the .k-in span outside of the .k-icon span in the Chrome debugger. The layout is like it's supposed to be. We do not have any custom JavaScript that's manipulating the TreeView. Is this a known bug with version we're using? Thank you.


Solution

  • We've searched for a couple of hours, but no luck. We made the decision to upgrade to Kendo 2020.5.513. It makes for some layout issues but it has fixed the issue with the treeview.