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

Issue with adding nodes to a large collection

3 Answers 41 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Carling
Top achievements
Rank 2
Carling asked on 07 Aug 2013, 10:34 PM
Hello,

We have a TreeView that uses on demand loading with a web service.  When adding nodes to a large collection (300 to 1000) in Internet Explorer 8, we get the "Stop running this script?" message.

We have ShowLineImages disabled, set debug="false", PersistLoadOnDemandNodes set to false, per your suggestions for performance, but we still face the issue.

So I used setTimeout() to throttle the addition of nodes, but I still run into the error at around 1100 nodes.  Without that functionality, it will only add about 350 nodes.

While debugging, I've found that the cause of the error is RadTreeNodeCollection.add() client side, which iterates through the entire collection.  Is this neccessary?  Is there a workaround to adding a node without this iteration?

Not sure how to attach a sample project (only allowing images), but I've got one ready.

Thanks for any help!

3 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 12 Aug 2013, 03:14 PM
Hello,

Since I am not able to replicate the described error could you please try to reproduce that issue with our online demo located here? Please watch a video showing the behavior of loading 1000 nodes under IE8 browser and let me know what exactly is different in your scenario. That way we can test it locally and investigate the problem.

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Carling
Top achievements
Rank 2
answered on 27 Aug 2013, 09:06 PM
Hi Boyan,

Sorry for the late reply.  I've implemented the solution in the link you provided, and when I return node data from my web service, I get a javascript error "w is undefined"

The data format I'm providing is 
[{"Text":"ABC","Value":3},{"Text":"DEF","Value":4}]

Is this correct?  I can't find an example to run that shows the data format.
0
Boyan Dimitrov
Telerik team
answered on 30 Aug 2013, 02:57 PM
Hello,

Please find attached a sample project following the provided example. I have tested the project under IE 8 and works as expected. Could you please give it a try and let us know how that worked?


Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TreeView
Asked by
Carling
Top achievements
Rank 2
Answers by
Boyan Dimitrov
Telerik team
Carling
Top achievements
Rank 2
Share this question
or