This is a migrated thread and some comments may be shown as answers.

Breaking Changes in TreeView 2008Q2 - Nodes.Add

1 Answer 44 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
erwin asked on 26 Jul 2008, 12:23 AM
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


1 Answer, 1 is accepted

Sort by
0
Accepted
Jordan
Telerik team
answered on 28 Jul 2008, 12:40 PM
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.
Tags
Treeview
Asked by
erwin
Top achievements
Rank 1
Veteran
Answers by
Jordan
Telerik team
Share this question
or