Unplanned
Last Updated: 01 Feb 2024 13:22 by ADMIN
Created by: Christian
Comments: 14
Category: TreeView
Type: Feature Request
34
I would like to be able to optimize the rendering of the TreeView component with a feature similar to the Row Virtualization in the Grid.
Completed
Last Updated: 06 Nov 2023 07:41 by ADMIN
Created by: Support ATT
Comments: 1
Category: TreeView
Type: Feature Request
2
Expose an OnItemRender event, which is raised for each TreeView item. The args should allow setting a Class, that will be applied at the topmost element of the item itself.
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: 11 Sep 2023 11:11 by Reto
Created by: Reto
Comments: 0
Category: TreeView
Type: Feature Request
2
Add an event that fires after the drag starts and before it ends. 
Unplanned
Last Updated: 26 Jul 2023 08:54 by ADMIN
Created by: Peter
Comments: 9
Category: TreeView
Type: Feature Request
10

Hi,

 

Is there a plan to support lines between treeview items as available in radtreeview?

 

radTreeView1.ShowLines = true; radTreeView1.LineStyle = TreeLineStyle.DashDot;

 

Without this it is very confusing to the end user what the connections between open items are.

 

Regards,


peter

 

 

 

 

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.

 

 

Completed
Last Updated: 04 May 2023 10:07 by ADMIN
Release 4.2.0 (26/04/2023)

Checking a checkbox of a on demand-loaded child then collapsing and reopening its parent makes the checkbox disappear.  However, it is still checked in the CheckedItems collection, but just not in the UI.  See this REPL example.  Steps...

1. Expand a top level item

2. Check its child checkbox

3. Collapse the top level item

4. Expand it again

Result: checkbox gone (in the UI)

 

 

 


Completed
Last Updated: 06 Apr 2023 11:10 by ADMIN
Release 4.2.0 (04/26/2023)
Created by: Jan
Comments: 4
Category: TreeView
Type: Bug Report
1

Hello,

I have a TelerikTreeView with about 2000 items bound to an ObservableCollection (Data). I use SelectedItems, SelectedItemsChanged, SelectionMode multitple and @bind-ExpandedItems.

When my users manually expand the nodes of the treeview, everything is fine and the operation of the treeview works smoothly. Loading UI components based on user selection takes less than 50ms.

As soon as I set the "ExpandedItems" collection from code (according to your treeview demo), the whole treeview operation becomes painfully slow with waiting times of 2 to 4 SECONDS for selection and expansion. Already expanding from code takes several seconds.

As soon as I reset the ExpandedItems from code and collapse the complete tree, the treeview is usable again without delays.


Unplanned
Last Updated: 27 Mar 2023 08:30 by ADMIN
Completed
Last Updated: 21 Mar 2023 13:29 by ADMIN
Release 4.2.0 (26/04/2023)

The TreeView has CheckBoxMode="@TreeViewCheckBoxMode.Multiple" and CheckParents="true". Only some checkboxes are checked and there are parent checkboxes in indeterminate state.

When I try to clear all checked checkboxes, the indeterminate checkboxes are not cleared and maintain their state.

ADMIT EDIT:

Initially, this bug report was about unchecking all child items. However, it appears that the opposite behavior exists too - if all children are checked programmatically, the parent checkbox will show as indeterminate. In this case, check the parent explicitly as well.

Completed
Last Updated: 21 Mar 2023 13:06 by ADMIN
Release 4.2.0 (26/04/2023)

If the application expands TreeView items programmatically, and then the user tries to select multiple items, an exception will occur.

The issue is a regression that occurred in version 3.0.0. A possible workaround is to Rebind() the TreeView with a small delay after programmatic item expansion.

<TelerikTreeView @ref="@TreeViewRef"
                 Data="@FlatData"
                 @bind-ExpandedItems="@ExpandedItems"
                 SelectionMode="@TreeViewSelectionMode.Multiple"
                 SelectedItems="@SelectedItems"
                 SelectedItemsChanged="@((IEnumerable<object> items) => SelectedItemsHandler(items))" />

<TelerikButton OnClick="@ExpandAll">Expand All</TelerikButton>
<TelerikButton OnClick="@CollapseAll">Collapse All</TelerikButton>

@code {
    public TelerikTreeView TreeViewRef { get; set; }
    public IEnumerable<TreeItem> FlatData { get; set; }
    public IEnumerable<object> SelectedItems { get; set; } = new List<object>();
    public IEnumerable<object> ExpandedItems { get; set; } = new List<object>();

    async Task ExpandAll()
    {
        ExpandedItems = FlatData.Where(x => x.HasChildren == true);

        await Task.Delay(1);
        TreeViewRef.Rebind();
    }

    void CollapseAll()
    {
        ExpandedItems = new List<object>();
        SelectedItems = new List<object>();
    }

    void SelectedItemsHandler(IEnumerable<object> items)
    {
        SelectedItems = items;
    }
    protected override async void OnInitialized()
    {
        FlatData = LoadFlat();
    }

    int TreeLevels { get; set; } = 3;
    int ItemsPerLevel { get; set; } = 3;
    int IdCounter { get; set; } = 1;
    List<TreeItem> LoadFlat()
    {
        List<TreeItem> items = new List<TreeItem>();
        PopulateTreeItems(items, null, 1);
        return items;
    }
    void PopulateTreeItems(List<TreeItem> items, int? parentId, int level)
    {
        for (int i = 1; i <= ItemsPerLevel; i++)
        {
            var itemId = IdCounter++;
            items.Add(new TreeItem()
            {
                Id = itemId,
                Text = $"Level {level} Item {i} Id {itemId}",
                ParentId = parentId,
                HasChildren = level < TreeLevels
            });
            if (level < TreeLevels)
            {
                PopulateTreeItems(items, itemId, level + 1);
            }
        }
    }

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


Completed
Last Updated: 21 Mar 2023 12:59 by ADMIN
Release 4.2.0 (26/04/2023)
If the treeview is in a component within the `@Body` and so gets disposed on navigation, there are errors in a WebAssembly app.
Completed
Last Updated: 21 Mar 2023 12:50 by ADMIN
Release 4.2.0 (26/04/2023)
Create a page that hosts a TreeView with checkbox selection inside a TelerikWindow. Provide an initially checked item and navigate to this page. When it renders the checkbox is not in a checked state. 
Duplicated
Last Updated: 13 Jan 2023 07:22 by ADMIN

Hello,

The problem is similar to https://feedback.telerik.com/blazor/1552955-child-treeview-items-not-checked-after-expand, but in this case, the TreeView is using load-on-demand and the OnExpand event. As soon as a checked parent is expanded, the child checkboxes are always unchecked.

Here is a test page. Expand the parent item, check it, collapse it and then expand it again. The child nodes will lose their checked state.

<TelerikTreeView Data="@FlatData"
                 OnExpand="@LoadChildren"
                 CheckBoxMode="@TreeViewCheckBoxMode.Multiple"
                 CheckChildren="true"
                 CheckParents="true"
                 @bind-CheckedItems="@CheckedItems"
                 @bind-ExpandedItems="@ExpandedItems">
</TelerikTreeView>

@code {
    List<TreeItem> FlatData { get; set; } = new List<TreeItem>();

    IEnumerable<object> CheckedItems { get; set; } = new List<object>();
    IEnumerable<object> ExpandedItems { get; set; } = new List<object>();

    async Task LoadChildren(TreeViewExpandEventArgs args)
    {
        TreeItem currItem = args.Item as TreeItem;

        if (args.Expanded && !FlatData.Any(x => x.ParentId == currItem.Id))
        {
            if (currItem.Id == 1)
            {
                FlatData.Add(new TreeItem()
                {
                    Id = 4,
                    Text = "Child 1 of Parent 1",
                    ParentId = 1,
                    HasChildren = false
                });

                FlatData.Add(new TreeItem()
                {
                    Id = 5,
                    Text = "Child 2 of Parent 1",
                    ParentId = 1,
                    HasChildren = false
                });
            }
        }
    }

    protected override void OnInitialized()
    {
        FlatData = LoadFlat();
    }

    private List<TreeItem> LoadFlat()
    {
        FlatData.Add(new TreeItem()
        {
            Id = 1,
            Text = "Parent 1",
            ParentId = null,
            HasChildren = true
        });

        return FlatData;
    }

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

Completed
Last Updated: 21 Dec 2022 08:56 by ADMIN
Release 4.0.0 (18 Jan 2023) (R1 2023)
Created by: NovaStor
Comments: 5
Category: TreeView
Type: Feature Request
9

Hi.

 

I'd like to request the ability to set the Enabled property on check boxes in the treeview.

 

For example, given a tree view with check boxes:


<TelerikTreeView Data="@StorageItems"
                 @bind-CheckedItems="@CheckedItems"
                 CheckBoxMode="TreeViewCheckBoxMode.Multiple"
                 CheckParents="true"
                 CheckChildren="true" />

I'd like to make the tree view read-only so the check boxes appear disabled and the user cannot check-mark or uncheck-mark them.

Thank you.

Unplanned
Last Updated: 12 Oct 2022 05:58 by Support ATT
I have a TreeView component and it has a horizontal scrollbar. I want to be able to drag an item and drop it in a location that is currently not in view. 
Completed
Last Updated: 26 Jul 2022 07:45 by ADMIN
Release 3.5.0
Created by: Winston
Comments: 2
Category: TreeView
Type: Bug Report
2

Per WAI-ARIA 1.2, the "aria-level" attribute, if present, "is an integer greater than or equal to 1".

However, Blazor TreeView uses 0-indexing for the attribute which means that the root item has an invalid (and ignored) aria-level property. This is problematic because the browser will infer the level from the DOM nesting for the root item, but then use aria-level for all other sub-trees, leading to inconsistent levels (in the demo, the level goes 2 > 1 > 2).

Unplanned
Last Updated: 17 Jun 2022 13:36 by Andy

I have a TreeView declared and bound to a hierarchical database table. I'd like to be able to Cancel the 'Check' function on any node where HasChildren == true. I don't mind the check box being visible, because I like the multiple check states of the Parent Nodes, but the user should be only able to actually check the nodes where HasChildren == false. Is there a way to cancel the check for those parent nodes?

Please forward the ticket as a feature request for TreeView. For example:

<TelerikTreeView Data="@Data" CheckParents="true"CheckOnClick="true"CheckChildren="false" AllowParentNodesCheck="false">

Unplanned
Last Updated: 05 May 2022 19:13 by Andrew
Created by: Andrew
Comments: 0
Category: TreeView
Type: Feature Request
2

The feature request is about introducing a configuration option about a delay to start the drag operation. Currently, the lack of such functionality causes unexpected drag clue appearance on double click. 

 

```
In my treeview the user can double-click to open an item or they can drag to reorganize the tree. When you double-click you can see the drag & drop initiates for the brief fraction of a second. Which is a confusing and unpleasant UX. It would be preferable if a drag & drop didn't initiate until the user dragged for 3-4 pixels from the mousedown location, as opposed to a single pixel. 

In general if there's a behavior like this that I would want to tweak, are there ways to adjust the control or override behaviors using Javascript? I used to do all sorts of stuff with the jQuery controls.

```

Completed
Last Updated: 28 Apr 2022 12:12 by ADMIN

The TreeView should automatically update when a change in data fields occur. Changes in the `ItemsField`, `HasChildren` are crucial to be tracked to allow easy manipulation of data in binding to hierarchical data. This request will fulfill the observable collection support of the TreeView.

---

ADMIN EDIT

Changes in the ExpandedField of the element have been previously handled in the TreeView. However, this has been a side effect of incorrect code in our component that was causing performance hit. We reviewed our component and how it could provide better coverage in user scenarios, so here are our steps:

- Implement tracking of data item changes with ObservableCollection, so that we could fully support binding to observable data - click the Vote and Follow buttons on the current page to raise the priority of this feature implementation and to get notified for status updates.



We've been evaluating a major change where the ExpandedItems to be controlled via parameter/state. So, we would really appreciate if you could share feedback whether this change would be good for your project and use case.

- Implementation of ExpandedItems in TreeView to substitute ExpandedField in the collection: https://feedback.telerik.com/blazor/1448095-expanded-items-handling-feedback-requested

We believe that the above steps are the way to go with the maturing of the TreeView component.

 

A workaround could be reinitializing the Data when you update the property of the item, that will force the treeview to update:

TreeViewData = new List<MyModel>(TreeViewData)

---

1 2 3