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

Stackoverflow occurs in bound mode when childmember and parentmember have the same value in a node.

3 Answers 35 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Bruce
Top achievements
Rank 2
Bruce asked on 15 Aug 2017, 02:49 PM
This happens when the control is loaded and bound to a datasource that contains this information, or when a new node is added with these values.  I understand why this logically would cause an error, but having a check in the control, to prevent an application crashing exception would be useful.

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Aug 2017, 09:37 AM
Hello Bruce, 

Thank you for writing.  

The hierarchy in RadTreeView is built considering the IDs for the records. That is why they are expected to be valid. You must not have the same ID for two nodes in order to build correct data. Otherwise, it is normal to obtain such errors indicating that the data is not valid.

Additional information how to setup the tree is available here: http://docs.telerik.com/devtools/winforms/treeview/data-binding/binding-to-self-referencing-data

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Bruce
Top achievements
Rank 2
answered on 16 Aug 2017, 04:09 PM
As I said, I understand that it is incorrect, my issue is that there is no error, or exception thrown, what happens is an unhandled stackoverflow that will crash the application.

Again, the treeview isn't responding that the data is invalid, it goes into an infinite loop, until it blows out the stack.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 Aug 2017, 07:44 AM
Hello Bruce, 

Thank you for writing back. 

Your feedback is greatly appreciated. However, the user is responsible for the validity of the data in RadTreeView. Hence, you should check the data before biding the tree.

If you have any additional questions, please let me know. 

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Treeview
Asked by
Bruce
Top achievements
Rank 2
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Bruce
Top achievements
Rank 2
Share this question
or