Load on demand from ado.net Data Service Cycle error

3 posts, 0 answers
  1. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 03 May 2010 Link to this post

    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. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 03 May 2010 Link to this post

    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.
  3. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3299 posts

    Posted 06 May 2010 Link to this post

    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.
Back to Top