VirtualMode in TreeView

6 posts, 0 answers
  1. Christ
    Christ avatar
    7 posts
    Member since:
    Feb 2011

    Posted 13 Apr 2011 Link to this post

    Hi all,

    I wondered if it was possible to use a virtual treeview, like in a gridview. There the option VirtualMode indicates that you implement you own data management routines, rather than adding items once... I expect to have a tree view with a lot of items, but I don't want them to be loaded at once (for performance reasons).

    Does anyone have and idea?

    Regards,
    C.
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 18 Apr 2011 Link to this post

    Hi Christ,

    You can use the Load-On-Demand mode of RadTreeView control for this behavior. More information about this feature you can find in our online documentation. In Q1 2011 SP1 release, planned for this week we will include full lazy mode support and performance improvements for the Load-On-Demand scenarios.

    Best wishes,
    Julian Benkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Christ
    Christ avatar
    7 posts
    Member since:
    Feb 2011

    Posted 12 Sep 2011 Link to this post

    Hi Julian,

    Thanks for your answer; only now I found some time to work on this issue.

    Another question arises now; When i have the root nodes loaded, but there are more nodes than fit in the visible area of the treeview, the scrollbar is not automatically shown. I've tried setting the AutoScroll option to true, but that doesn't help.

    Do you have any ideas how to solve that?

    Thanks,
    Christ
  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 15 Sep 2011 Link to this post

    Hello Christ,

    Please accept my apologies for the delayed answer.

    We found an issue in this scenario. I logged the issue in our Public Issue Tracking System. The fix will be available in one of the next releases. Currently, you can add this code line at the end in your Form Load event handler to update the layout:

    this.radTreeView1.TreeViewElement.Update(Telerik.WinControls.UI.RadTreeViewElement.UpdateActions.Reset);

    I hope this helps.

    Best wishes,

    Julian Benkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Christ
    Christ avatar
    7 posts
    Member since:
    Feb 2011

    Posted 14 Feb 2014 in reply to Julian Benkov Link to this post

    Hi again,

    Since we have a growing list of root nodes in the tree view I was wondering if you have plans to implement a true virtualised version of the treeview, that only loads the visible root nodes to the treeview and requests for more items when scrolling down the treeview. We really need this since we're having serious performance issues with the treeview now. One of our customers is adding items to a database on a daily basis (approx 150 items per day) and have currently a list of 500K items to be shown in the tree. This is hardly workable and will become worse if we don't change the system.

    Can you please advise on how to address this issue?

    Thanks,
    Christ Hagenaars
  7. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 19 Feb 2014 Link to this post

    Hello Christ,

    Thank you for contacting us.

    Similar to RadGridView, RadTreeView is virtualized as well. Its visual nodes (TreeNodeElement) are reused by the data nodes (RadTreeNode), which bring increased performance and optimized memory footprint. Although, the initial adding of a great number of RadTreeNodes takes some adequate time, scrolling operation is performed without any performance issues.
    The Load On Demand feature helps reduce performance and memory costs incurred when all nodes are loaded at once. To benefit from this feature, you can have a look at our Load On Demand help article, which Julian had already recommended. If it is not applicable for your specific case, a sample project would be highly appreciated, which demonstrates the serious performance issue that you are experiencing. Thus, we would be able to investigate the specific case and suggest an appropriate solution. Thank you for the co-operation.

    Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
Back to Top
UI for WinForms is Visual Studio 2017 Ready