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

GridViewDataColumn generation very slow when using aggregate functions

4 Answers 105 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ulrich
Top achievements
Rank 1
Ulrich asked on 15 Oct 2014, 09:02 AM
Dear Telerik-Team,

creating many GridViewDataColumn (about 500) in code behind and
adding them to a RadGridView (using RadGridView.Columns.Add() ) is working in a reasonable amount of time (<1 ms for each column). 
I am also adding AggregateFunctions to each of those columns (GridViewDataColumn.AggregateFunctions.Add()).
The function to create and add the columns is called in the class constructor right after InitializeComponent();
The RadGridView control itself is defined in XAML.

Now to the actual issue :

The problem arises when columns are added or recreated after that. 
Then, adding columns to the gridview is really slow ( > 10 - 50 ms for each column).
I remove all columns using RadGridView.Columns.Clear() prior to adding the new ones.
This issue only comes up when AggregateFunctions were added to the columns before.
And it is not just getting slower - the time it takes to add a column actually increases with each column then.

Do have any idea what the reason for this behaviour might be?

Thanks and Kind Regards!

4 Answers, 1 is accepted

Sort by
0
Ulrich
Top achievements
Rank 1
answered on 16 Oct 2014, 05:33 AM
Version of Telerik.Windows.Controls.GridView.dll  is 2014.1.331.45 .
0
Dimitrina
Telerik team
answered on 17 Oct 2014, 08:16 AM
Hello,

As the version you use is old (2014.1.331.45), would you please also test with our latest version?

Generally, I can suggest you to check the Tips and Tricks article on improving the performance of RadGridView. Does any of those suggestions help?

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ulrich
Top achievements
Rank 1
answered on 20 Oct 2014, 10:43 AM
Hi Dimitrina,

i tested again with your latest version and have gone through all performance tips, but the issue is still present.

However, i was able to find a workaround by setting the RadGridView.ItemsSource = null
then adding the columns and finally setting the ItemsSource back to its original value!

btw. : I have a VS-project which i like to upload regarding this issue. How can i do that?
0
Dimitrina
Telerik team
answered on 20 Oct 2014, 11:49 AM
Hi,

I am glad to hear you managed to find a workaround. You can open a new support thread and attach the demo project there.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Ulrich
Top achievements
Rank 1
Answers by
Ulrich
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or