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

RadTreeListView is very slow

1 Answer 143 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Jerome
Top achievements
Rank 1
Jerome asked on 06 Jul 2010, 10:20 AM
Hi!
The new Silverlight RadTreeListView based on RadGridView takes more than 10 seconds to display a tree with 700 nodes.
What Am I doing wrong? The WinForms application I am porting to Silverlight loads the same tree almost instantaneously.

Here is my code behind:

            treeView.ItemsSource = new SourceTreeItem[] { root };
            treeView.ExpandAllHierarchyItems();

Here is my XAML:

        <telerik:RadTreeListView
            Grid.Row="2" 
            Name="treeView"
            AutoGenerateColumns="False"
            IsReadOnly="True"
            SelectionMode="Extended" 
            AutoExpandGroups="True" 
            CanUserDeleteRows="False" 
            CanUserFreezeColumns="False" 
            CanUserInsertRows="False" 
            CanUserReorderColumns="False" 
            CanUserSortColumns="False" 
            EnableRowVirtualization="False" 
            EnableColumnVirtualization="False" 
            GridLinesVisibility="None" 
            IsFilteringAllowed="False" 
            RowIndicatorVisibility="Collapsed" 
            ShowColumnHeaders="True" 
            ShowGroupPanel="True"
            telerik_ctrl:StyleManager.Theme="Windows7"
            RowStyle="{StaticResource RowStyle}"
            SelectionChanged="treeView_SelectionChanged" 
            DataLoadMode="Synchronous">

            <!-- hierarchy is determined by the Children property -->
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
            </telerik:RadTreeListView.ChildTableDefinitions>

            <!-- column definitions -->
            <telerik:RadTreeListView.Columns>
                
                <!-- Name column -->
                <telerik:GridViewDataColumn 
                    Header="Name" 
                    DataMemberBinding="{Binding Name}" 
                    Width="*" />

                <!-- Sources column -->
                <telerik:GridViewDataColumn 
                    Header="Sources" 
                    DataMemberBinding="{Binding SourceCount}" 
                    TextAlignment="Right" 
                    Width="55" />

                <!-- Documents column -->
                <telerik:GridViewDataColumn 
                    Header="Doc." 
                    DataMemberBinding="{Binding DocumentCount}" 
                    TextAlignment="Right"
                    Width="55" />

            </telerik:RadTreeListView.Columns>

        </telerik:RadTreeListView>

Regards,
Jerome

1 Answer, 1 is accepted

Sort by
0
Jerome
Top achievements
Rank 1
answered on 06 Jul 2010, 01:34 PM
Solved!!
All I needed to do is remove these two lines:

            EnableRowVirtualization="False" 
            EnableColumnVirtualization="False" 
Tags
TreeListView
Asked by
Jerome
Top achievements
Rank 1
Answers by
Jerome
Top achievements
Rank 1
Share this question
or