Unplanned
Last Updated: 04 Apr 2024 16:19 by Daniel

I am trying to restore the expanded items by programmatically populating the ExpandedItems collection of the TreeView.

I have overriden "Equals" on the model, so the items are not compared by reference but by a unique identifier. The problem is that the TelerikTreeView does not respect this override and does not expand the items.
Other controls with similar features do respect overriden implementation of "Equals".

Reproduction: https://blazorrepl.telerik.com/cSuKkqwu46w4sHaW53.

Unplanned
Last Updated: 26 Oct 2023 08:23 by Michael
Try to update the node icon/text via the OnItemClick event. Every second click on a child node fails the update.
Unplanned
Last Updated: 31 May 2023 12:17 by Rayko

The problem at hand arises when attempting to update the CheckedItems property of a TreeView control from within an async method.

The problem seems to be timing-related and is not always reproducible. The issue is observed most often when starting the project. It seems to be reproducible only in Blazor Server App.

Reproduction:
To reproduce the issue, try running the following snippet in a Blazor Server App.

 

@page "/"
<TelerikTreeView Data="@FlatData"
                 CheckBoxMode="@TreeViewCheckBoxMode.Multiple"
                 CheckParents="@true"
                 CheckChildren="@true"
                 CheckOnClick="@false"
                 @bind-CheckedItems="@SelectedItems">
</TelerikTreeView>

@code {
    List<TreeItem> FlatData { get; set; }
    IEnumerable<object> SelectedItems { get; set; } = new List<object>();
    protected override async Task OnInitializedAsync()
    {
        await GenerateData();
        await SelectDefault();
    }

    async Task SelectDefault()
    {
        await Task.Delay(100);
        SelectedItems = FlatData.Where(data => data.Id == 2);
    }
#pragma warning disable
    async Task GenerateData()
    {
        FlatData = new List<TreeItem>();

        FlatData.Add(new TreeItem()
            {
                Id = 1,
                Text = "Project",
                ParentId = null,
                HasChildren = true,
                Icon = "folder",
                Expanded = true
            });

        FlatData.Add(new TreeItem()
            {
                Id = 2,
                Text = "Design",
                ParentId = 1,
                HasChildren = true,
                Icon = "brush",
                Expanded = true
            });
        FlatData.Add(new TreeItem()
            {
                Id = 3,
                Text = "Implementation",
                ParentId = 1,
                HasChildren = true,
                Icon = "folder",
                Expanded = true
            });
    }

    public class TreeItem
    {
        public int Id { get; set; }
        public string Text { get; set; }
        public int? ParentId { get; set; }
        public bool HasChildren { get; set; }
        public string Icon { get; set; }
        public bool Expanded { get; set; }
    }
}

The second TreeItem should be selected.

 

 

Unplanned
Last Updated: 27 Mar 2023 08:30 by ADMIN
Unplanned
Last Updated: 28 Mar 2022 09:04 by ADMIN
Created by: Winston
Comments: 1
Category: TreeView
Type: Bug Report
2

There are two related issues in this bug report:

  1. TreeView does not allow horizontally scrolling when there are items that extend past the viewport
  2. TreeView cuts off items when the browser is zoomed in

See REPL: https://blazorrepl.telerik.com/wwOHGPvi11wy1OBp06

Steps to reproduce:

  1. Open and run the REPL.
  2. Observe that the last deeply-nested tree item, Design20.......01 is not fully visible (if it is fully visible, just add more 0s in the middle). Specifically, the trailing "1" is not visible and cannot be scrolled to.
  3. Zoom the browser to 200%.
  4. Observe that the TreeView still does not allow horizontal scrolling to view any of the items cut off by the increased zoom.
Unplanned
Last Updated: 18 Jan 2022 13:37 by ADMIN
Created by: Christian
Comments: 1
Category: TreeView
Type: Bug Report
0

I'm trying to use a draggable TreeView inside a Window. I think the Window is interfering with the display of the red placement arrow when I try to move a tree node. I am able to have this work on another TreeView that is not in a Window.

Here is a REPL test page.