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

Performance question

7 Answers 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Niclas Junsved
Top achievements
Rank 1
Niclas Junsved asked on 07 Apr 2010, 09:42 PM

I have some performance issues with the grid view (Q1 2010).

The example is very simple, I try to display about 40 000 rows with 10 columns and I use a WCF service that calles a Stored Procedure (GetOrderDetails) and looks as below:

 

 
        [OperationContract]          
        public List<GetOrderDetailsResult> GetRegionOrderDetailsByMonth(string year, string month)  
        {  
            ACNormDataClassesDataContext acdb = new ACNormDataClassesDataContext();  
 
            List<GetOrderDetailsResult> godr = acdb.GetOrderDetails(year, month).ToList();              
 
            return godr;  
        } 


I call the WCF silverlight enabled web service operation from my Silverlight Application like below:

  

        void wsproxyGetRegionOrderDetails_GetRegionOrderDetailsByMonthCompleted(object sender, GetRegionOrderDetailsByMonthCompletedEventArgs e)  
        {  
            radGridMonthDetailsOrder.AutoGenerateColumns = true;  
            radGridMonthDetailsOrder.ItemsSource = e.Result;  
 
            radGridMonthDetailsOrder.IsBusy = false;  
        } 

The grid view is located in a grid.

It works fine with about 1000 rows but above that the browser stops responding.

I suppose I need som advice regarding best practises when handling a massive number of rows.

Best Regards

Niclas

7 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Apr 2010, 06:29 AM
Hello Niclas,

You can use paging to avoid such problems. With WCF RIA Services this can be done very easily since all you need to do is to bind the grid to DomainDataSource however with plain WCF services you need to code the entire logic by yourself. You can check my blog post for more info about server-side operations (including paging) with plain WCF services.

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
Max
Top achievements
Rank 1
answered on 28 Apr 2010, 02:16 PM
I'm also experiencing performance issues with the RadGridView control, version 2010.1.309.1030.

Here is my XAML:

<Border x:Name="bdrReportResults" BorderThickness="2" BorderBrush="#AA2F93E8" Margin="285,2,5,5" CornerRadius="5"
             
            <StackPanel> 
                 
                <!-- TABS: --> 
                <telerikNavigation:RadTabControl x:Name="radTabResults" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,3,3,3" Visibility="Visible"
                    <telerikNavigation:RadTabItem Header="Report" FontSize="14"
                        <telerikGridView:RadGridView x:Name="radGridView" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> 
                    </telerikNavigation:RadTabItem> 
                    <telerikNavigation:RadTabItem Header="Chart" FontSize="14"
                        <telerikChart:RadChart x:Name="radChart" Margin="5,5,5,5" Content="RadChart" /> 
                    </telerikNavigation:RadTabItem> 
                </telerikNavigation:RadTabControl> 
                 
                <TextBlock x:Name="txtNoResults" Text="No results found for your selection criteria." Foreground="White" FontSize="16" HorizontalAlignment="Center" Margin="0,100,0,0" /> 
                 
                             
            </StackPanel> 
        </Border> 

And here is my code to populate the grid from a WCF web service call:

radGridView.AutoGenerateColumns = false
radGridView.Columns.Clear(); 
radGridView.Columns.Add(CreateGridColumn(typeof(string), "Name""Employee Name")); 
 
radGridView.ItemsSource = e.Result; 

Even if the results (e.Result.Count) is 300 rows, it takes between 5-10 seconds to populate the grid and the browser freezes during that time period.  300 records isn't really a lot in my opinion - paging shouldn't be necessary.

Also, once the grid is populated, the vertical scrollbars are not visible.

Any help would be greatly appreciated.


0
Vlad
Telerik team
answered on 28 Apr 2010, 02:35 PM
Hello,

In you case the grid is inside StackPanel and it will be measured with infinity. In this case there will be no virtualization. You can use Grid instead StackPanel to avoid such problems.

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
Max
Top achievements
Rank 1
answered on 28 Apr 2010, 03:31 PM
Incredible.  By simply nesting the RadGridView within a grid rather than a stackpanel, it fixed both the performance issue and the scrolling issue.  Thanks!
0
Max
Top achievements
Rank 1
answered on 28 Apr 2010, 05:55 PM
One other puzzling thing - the column headers will not allow me to group them by dragging them to the grouping area.  Another RadGridView that I'm using does allow grouping.

What would prevent this from working?
0
Vlad
Telerik team
answered on 29 Apr 2010, 07:06 AM
Hi,

Please download our latest service pack (Q1 2010 SP1). We had similar problems when the grid is inside popup.

Regards,
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
Max
Top achievements
Rank 1
answered on 29 Apr 2010, 01:09 PM
Thank you - the Q1 2010 SP1 build fixed the grid grouping issue in a ChildWindow as well as a problem I had with the RadChart control.
Tags
GridView
Asked by
Niclas Junsved
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Max
Top achievements
Rank 1
Share this question
or