Column groups + sorting in RadGridView = bad performance

0 Answers 126 Views
GridView
Eldoir
Top achievements
Rank 2
Iron
Iron
Iron
Eldoir asked on 28 Sep 2021, 07:18 AM | edited on 28 Sep 2021, 08:22 AM

Hello,

Some of the types I use for the columns of my RadGridView are implementing IComparable so that clicking on these columns sorts them by value.
I also wanted to add column groups to that RadGridView but I noticed there is a severe performance drawback to this: on a sample of 4 rows and ~100 columns, clicking on a column to sort it takes way more time when I have column groups (~0.5s without, 2.5s-4s with).

With a slightly larger sample (6 rows and ~200 columns), it blows up to really unacceptable times (35s-55s)!

For the record, I create columns and column groups dynamically at runtime, the rows are virtualized, and some rows don't have a value for some columns (thus raising System.Windows.Data errors when we load these cells).

Am I doing something wrong?

Thanks in avance!

Martin Ivanov
Telerik team
commented on 01 Oct 2021, 07:08 AM

Can you tell me which feature do you mean with "column group"? Do you mean the grouping by column or the column groups that are rendered on top of the columns? Also, can you tell me how many groups do you have? If send over a sample project showing the issue I will take a look.

As a side note, you can test the performance by running the project without debugging. If there is a big number of binding errors that are printed in the Output pane of Visual Studio, the performance w ill be noticeably slow. When running the project without debugging, the errors won't get printed, thus improving the performance.

Martin Ivanov
Telerik team
commented on 01 Oct 2021, 07:57 AM

I believe I've answered my question by finding your other forum post. I've tested the reported scenario, but I wasn't able to recreate this. You can check the attached project and let me know if I am missing anything. You can also take a look at the Performance Tips and Tricks RadGridView article.

Eldoir
Top achievements
Rank 2
Iron
Iron
Iron
commented on 04 Oct 2021, 01:58 PM

Hello Martin and thanks for your answer,

The attached project does not really look like the code I have so I can't really relate,

But what I can tell is that after some changes to my code and after fixing my binding errors, I now have good performances with the sorting (less than 0.5 seconds, as one could expect).

The bad news is that I don't know precisely what actually fixed my problem since my code went through many changes.
Thanks anyway for your answer!

Martin Ivanov
Telerik team
commented on 06 Oct 2021, 11:20 AM

I am glad to hear that the performance is better now.

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Eldoir
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or