Breaking Changes in TreeView 2008Q2 - Nodes.Add

2 posts, 1 answers
  1. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 25 Jul 2008 Link to this post

    2008Q2 throws an exception if you add the same TreeNode twice to a Nodes
    collection, while 2008Q1 allowed (or silently ignored) this.

    Actually found a coding error in my test app, where the same child node
    was added multiple times. The exception message could be friendlier ....

    Regards
    Erwin


  2. Answer
    Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 28 Jul 2008 Link to this post

    Hi Erwin,

    Thank you for writing.

    There was a undocumented behavior of the Add method that allowed the method to be called with a node that is already in the collection. In the Q2 2008 version that behavior was fixed and it is expected to get an exception if you are trying to add/insert a node that is already in the collection. The Move method should be used if you want to move a node to another position in the same collection.
    However, I admit that the exception message was indeed unclear and we have changed it.

    Best wishes,
    Jordan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top