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

Load on demand from ado.net Data Service Cycle error

2 Answers 25 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Nick Wood
Top achievements
Rank 1
Nick Wood asked on 04 May 2010, 12:45 AM
Hi There

Using Silverlight 4 with the latest Telerik silverlight 4 controls

I am following the method here: http://www.telerik.com/help/silverlight/radtreeview-populating-with-data-databinding-to-adonet-service.html to load tree view elements on demand from the data service.

When I try to expand and contract tree elements before the sub elements have had a chance to load, I get the following:
Line: 56
Error: Unhandled Error in Silverlight Application
Code: 4008    
Category: RuntimeError       
Message: Layout cycle detected.  Layout could not complete.     
MethodName:      


Is there any way to handle this or lock the control until the sub tree items have had a chance to load. There must be a way to handle this as the users constantly hit this error.

2 Answers, 1 is accepted

Sort by
0
Nick Wood
Top achievements
Rank 1
answered on 04 May 2010, 01:42 AM
Actually, I think I have found the issue. it seems to have been causes by the treeview control being wrapped in a scrollviewer. I was lead to this by posts outside of telerik on this issue that reference sizing as the cause of this error. When I removed the scrollviewer, I have not been able to replicate this issue again.
0
Tina Stancheva
Telerik team
answered on 06 May 2010, 02:37 PM
Hello Nick Wood,

Thank you for this report.

The problem is that wrapping the control inside a StackPanel or a ScrollViewer will interfere with the virtualization of the control, thus slowing it down.

Can you tell us why you needed a ScrollViewer wrapped around the TreeView?

Best wishes,
Tina Stancheva
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TreeView
Asked by
Nick Wood
Top achievements
Rank 1
Answers by
Nick Wood
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or