RadTreeView inside RadPanelBarItem not virtualizing

4 posts, 0 answers
  1. Brian Nguyen
    Brian Nguyen avatar
    9 posts
    Member since:
    Sep 2009

    Posted 24 May 2010 Link to this post

    I have a RadPanelBar with one RadPanelBarItem that contains a RadTreeView with IsVirtualized="True". While the RadTreeView is inside the RadPanelBarItem, the virtualization is not working (it takes about 7 seconds to load 500 items). However, if I take the RadTreeView out of the RadPanelBar, virtualization works (it takes about 1 second to load 500 items).

    I assume it is similar to putting a RadTreeView inside of a ScrollViewer because it's childen have infinite space and therefore disables virtualization. How can I overcome this issue?

    Thanks in advance,

  2. Miroslav
    Miroslav avatar
    922 posts

    Posted 25 May 2010 Link to this post

    Hello Brian Nguyen,

    Yes, you are correct. The PanelBar contains a ScrollViewer in its template and its panel acts as StackPanel (which does not limit the height of its children even if it exceeds its own height).

    Is setting a (Max)Height on the TreeView an option for you? Alternatively you need to disable the vertical scrolling  in the PanelBar.

    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.
  3. Brian Nguyen
    Brian Nguyen avatar
    9 posts
    Member since:
    Sep 2009

    Posted 25 May 2010 Link to this post


    I was able to set the MaxHeight of my RadTreeView by binding it to the ActualHeight property of the parent UserControl.

    MaxHeight="{Binding ElementName=UserControlName, Path=ActualHeight}"

    * You must set the x:Name="UserControlName" on your UserControl for the above binding to work.
  4. Karl
    Karl avatar
    12 posts
    Member since:
    Jan 2011

    Posted 24 Feb 2011 Link to this post


    Thanks, this helped me out and is a very elegant solution.
Back to Top