RadTreeView - missing API

5 posts, 1 answers
  1. Simonas
    Simonas avatar
    5 posts
    Member since:
    Feb 2011

    Posted 03 Sep 2014 Link to this post

    Hi,

    I've downloaded trial version of Telerik controls for WinForms mainly to verify if RadTreeView contains required functionality. After playing around for a while I've noticed that it doesn't have couple of methods that are documented in Telerik site:

    1) There's no method to add RadTreeNode to RadTreeNodeCollection using Add() method.
    http://www.telerik.com/help/winforms/treeview-working-with-nodes-adding-and-removing-nodes.html

    2) There's no method to insert RadTreeNode using index to RadTreeNodeCollection:
    http://www.telerik.com/help/winforms/treeview-working-with-nodes-reordering-nodes.html

    Is it limitation for trial version or is this functionality removed?

  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 04 Sep 2014 Link to this post

    Hi Simonas,

    Thank you for writing.

    The methods mentioned are still present and fully functional. Here is how to use them:
    RadTreeView tree = new RadTreeView();
    this.Controls.Add(tree);
    tree.Nodes.Add(new RadTreeNode("addedNode"));
    tree.Nodes.Insert(0, new RadTreeNode("insertedNode"));

    I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

    Regards,
    Stefan
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Simonas
    Simonas avatar
    5 posts
    Member since:
    Feb 2011

    Posted 04 Sep 2014 in reply to Stefan Link to this post

    Hi Stefan,
    Thanks for code snippet, but I still can't see this API in the downloaded assemblies. Here's the screenshot of what Object Browser shows for RadTreeNodeCollection. Let me know if I'm doing something wrong.

    Version : 2014.2.715.20
  5. Answer
    Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 05 Sep 2014 Link to this post

    Hello,

    RadTreeNodesCollection inherits from NotifyCollection<RadTreeNode>, which inherits from Collection<T> and the Add(T) method is defined in the latter and is public, hence this method can be used as I demonstrated in the below example. If you still experience issues, please open a new support ticket where you can attach a sample together with the assemblies you use and we will review the precise case.

    Regards,
    Stefan
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  6. Simonas
    Simonas avatar
    5 posts
    Member since:
    Feb 2011

    Posted 05 Sep 2014 in reply to Stefan Link to this post

    Found it. You need to have Telerik.WinControls assembly added together with Telerik.WinControls.UI to get all the methods - Insert/Add RadTreeNode.

    Thanks !
Back to Top
UI for WinForms is Visual Studio 2017 Ready