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

Slow speed of gridview and

10 Answers 349 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 02 Jul 2009, 07:42 AM
Hello to everybody,
after 5 days developing with the radgridview I loved the fast binding and simpliness of showing data but I'm now facing the performance problem...
I bind 1052 rows to the grid, each row is has those items :

[

DataMember]

 

 

 

public string {get;set;}

 

[

 

DataMember]

 

 

 

public string {get;set;}

 

[

 

DataMember]

 

 

 

public string {get;set;}

 

[

 

DataMember]

 

 

 

public string { get; set; }

 

[

 

DataMember]

 

 

 

public string { get; set; }

 

[

 

DataMember]

 

 

 

public string { get; set; }

 

[

 

DataMember]

 

 

 

public double { get; set; }

 

[

 

DataMember]

 

 

 

public double { get; set; }

 

[

 

DataMember]

 

 

 

public DateTime { get; set; }

 

 

 

[DataMember]

 

 

 

public string { get; set; }

Those data are retrieved by WCF WebService wich call a StoreProcedure
Scrolling down with the gridview is quite slow (I've tryied both syncronous and asynchronous way)... is there a way of speeding up things?
Can I do a paging with the starting letters of a column?

How the asyncronous way works internally? profiling SQL I say a tons of call to the DB, is it done blocks by blocks, or item per item? Can it took too resources from the DB?

I'm also wondering to insert a childrentemplate and I followed the link Vlad provided me , http://www.telerik.com/community/forums/silverlight/gridview/load-on-demand-gridview.aspx

but when it completes the WS call method, an I bind the RadGridView.ItemsSource I see the gridview with empty values, if I close the + then reopen it I see the data till the next WS call has been termninated... then again it's empty (I see the rows, but empty).. how can I fix this?

 

Thanks in advance

Paolo

10 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 07 Jul 2009, 03:55 PM
Hello Paolo,

Looking at your code I see 10 properties. This should not slow you. With some of the next releases we will introduce columns virtualization so this will greatly improve scrolling.
Could send us sample project demonstrating your case so we can investigate it further?

When in asynchronous mode all data operation (filtering, sorting) are executed on background thread.
As for the SQL - it all depends from your WCF method. Silverlight is client side (we don't execute anything on the server - as it may not have server side).
I'm not sure that I've understand you question about children template? Can you elaborate more?
Thanks.

Regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ktang
Top achievements
Rank 1
answered on 10 Jul 2009, 10:27 PM
hi
i am experiencing the same problem. my gridview has 13 columns and i tested both 100 rows and 500 rows.  scrolling, selecting, grouping, sorting and filtering are very slow (30 seconds + to complete the task?)

can i send you my project and may be you can help me out and give me some pointers on how to speed up these operations?

Thank you

Kenneth
0
Hristo
Telerik team
answered on 13 Jul 2009, 09:00 AM
Hi ktang,

In order to attach files you need to open a support ticket.
One thing that you should check is that RadGridView is not in StackPanel or ScrollViewer. This will break RadGridView virtualization.


Greetings,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ktang
Top achievements
Rank 1
answered on 14 Jul 2009, 05:42 PM
hi Hristo

thanks for the quick response.  I will open a support ticket next time.  Your suggestion about removing the gridview from stackpanel works.  my gridview is now performing like I expected.

Thank you

Kenneth
0
Daniel Lacatus
Top achievements
Rank 1
answered on 28 Jul 2009, 03:27 PM
Hi all

I am seeing here that 1052 lines slows down a grid .. I have only 10 rows .. and it's VERY SLOW !!
I MUST be doing something wrong :)

I will try to post here some info about my littlle test project:

public partial class MainPage : UserControl
    {
        private string gridPropertyName;
        private List<test> lstText;
        public MainPage()
        {
           lstText = new List<test>();
            for (int i = 0; i < 10; i++)
            {
                test t1 = new test();
                t1.Test1 = "xxxxxxxx";
                t1.Test2 = "xxxxxxxx";
                t1.Test3 = "xxxxxxxx";
                t1.Test4 = "xxxxxxxx";
                t1.Test5 = "xxxxxxxx";
                t1.Test6 = "xxxxxxxx";
                lstText.Add(t1);
            }

private void Button_Click(object sender, RoutedEventArgs e)
        {
            GridArea.ItemsSource = lstText;
        }
}

<UserControl x:Class="Basoa_BI.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Basoa_BI;assembly=Basoa_BI"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
    xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">

    <UserControl.Resources>
        <DataTemplate x:Key="Property">
            <TextBlock Text="{Binding Name}" />
        </DataTemplate>
        <telerik:HierarchicalDataTemplate x:Key="Entity" ItemTemplate="{StaticResource Property}" ItemsSource="{Binding PropertyList}">
            <TextBlock Text="{Binding Name}" />
        </telerik:HierarchicalDataTemplate>
        <telerik:HierarchicalDataTemplate x:Key="Module" ItemTemplate="{StaticResource Entity}" ItemsSource="{Binding EntityList}">
            <TextBlock Text="{Binding Name}" />
        </telerik:HierarchicalDataTemplate>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="false">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"></ColumnDefinition>
            <ColumnDefinition ></ColumnDefinition>
            <ColumnDefinition Width="200"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="3*"></RowDefinition>
            <RowDefinition Height="4*"></RowDefinition>
        </Grid.RowDefinitions> <local:DropableGridView x:Name="GridArea" Grid.Column="1" Grid.Row="1">
}

I guess that`s all..
ANY help will be really appreciated!
Thanks guys!





0
Daniel Lacatus
Top achievements
Rank 1
answered on 29 Jul 2009, 08:17 AM

Forgot to mention that I am also using a Draggable TreeView and a Dropable ListBox in the same control, the Drag&Drop available from the Drag&Drop Manager. maybe it's important, but the grid is very slow.
Please help..
0
Hristo
Telerik team
answered on 29 Jul 2009, 11:03 AM
Hello Daniel Lacatus,

I wasn't able to reproduce your problem.
Could us send us the project so we can investigate this further?

Regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Daniel Lacatus
Top achievements
Rank 1
answered on 29 Jul 2009, 11:57 AM

  Hi Hristo,

  I've opened a support ticket, and posted there the problem including the source files of the project (http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=231076)

  Thanks again, and hope to hear from you soon,
  Daniel
0
Ryan
Top achievements
Rank 1
answered on 22 Oct 2011, 05:24 AM
Hi Daniel, Did you find a solution to your slow rendering issue? I'm having a similar problem, I only have 12 columns by 80 rows (with <40 displaying on the screen) and rendering speed is 3 to 4 times slower than displaying the same data in win forms. I've submitted a support ticket( 474795) however I'm still having unacceptable performance after applying their recommendations (see below).

"...Generally there is a big difference between WinForms and WPF. In WPF there are measure and arrange cycles which indeed are a little bit slower than rendering in WinForms. I would suggest to remove all star (*) columns in your application since this breaks performance with many columns. For more information about how you can speed up your application you can take a look at this online help topic. ... "
0
Vlad
Telerik team
answered on 24 Oct 2011, 07:01 AM
Hello,

 What's your grid version? 

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Michele
Top achievements
Rank 2
Answers by
Hristo
Telerik team
ktang
Top achievements
Rank 1
Daniel Lacatus
Top achievements
Rank 1
Ryan
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or