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

Data taking an extremely long time to load

2 Answers 45 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 02 May 2011, 09:03 PM
Greetings!

I'm using a RadGridView that's bound to a QueryableCollectionView. I'm using this in more than a dozen pages without a problem.

I have one page where the loading time is 60+ seconds for only 1800 rows of data, and I'm hoping somebody can spot something I missed:

<df:DataForm x:Name="dfSubassembly"
                         Width="{Binding Width, ElementName=GV1}"
                         CurrentItem="{Binding SelectedSubassembly}"
                         ItemsSource="{Binding Subassemblies}"
                         AutoEdit="False"
                         AutoCommit="False"
                         Height="0"
                         Margin="0,0,0,10">
</df:DataForm>
<telerik:RadGridView x:Name="GV1"
                                     ItemsSource="{Binding Subassemblies}"
                                     DataLoadMode="Asynchronous"
                                     ShowGroupPanel="False"
                                     EnableColumnVirtualization="True"
                                     EnableRowVirtualization="True"
                                     SelectedItem="{Binding SelectedSubassembly, Mode=TwoWay}"
                                     AutoGenerateColumns="False"
                                     HorizontalAlignment="Left"
                                     IsReadOnly="True">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectedCellsChanged">
                            <ei:GoToStateAction StateName="Open"/>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding SubassemblyCode}" Header="Subassembly Code" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding SubassemblyDescription}" Header="Subassembly Description" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding UsageCode}" Header="Usage Code" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding UsageCodeDescription}" Header="Usage Code Description" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding DrawingFile}" Header="Drawing File" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding FercAccount}" Header="FERC Account" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding MaintenanceAccount}" Header="Maintenance Account"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
<telerik:RadDataPager x:Name="radDataPager" Grid.Row="1" Source="{Binding Subassemblies}" PageSize="10"/>
      
The callback fxn for my Web Service:

private void GetSubassembliesCallback(ObservableCollection<TSMVVM.Model.Subassemblies> subassemblies)
{
    if (subassemblies != null)
    {
        if (subassemblies.Count > 0)
    {
            Subassemblies = new QueryableCollectionView(subassemblies);
        }
    }
}
 The line where I set my Subassemblies = new QueryableCollectionView(subassemblies) takes about 60 seconds. subassemblies is just my OC<Subassemblies> with a count of 1846.

SS

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 03 May 2011, 06:58 AM
Hello,

 Your grid is measured with infinity height most probably. This may happen if any virtual items control (like ListBox, DataGrid, RadGridView, etc.) is inside StackPanel, ScrollViewer, Canvas, etc. - in this case there will be no rows virtualization and the component will try to create all rows at once.

Best wishes,
Vlad
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
0
Scott
Top achievements
Rank 1
answered on 03 May 2011, 04:51 PM
Yeah I caught that late last night too. Setting a fixed height on the grid (inside of a stackpanel) fixed it. Thanks Vlad.
Tags
GridView
Asked by
Scott
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Scott
Top achievements
Rank 1
Share this question
or