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

Terrible scrolling/sorting performance when using custom row template together with AlternationCount

5 Answers 35 Views
GridView
This is a migrated thread and some comments may be shown as answers.
hwsoderlund
Top achievements
Rank 1
hwsoderlund asked on 08 Nov 2012, 02:15 PM
I am using a custom row style and row template for RadGridView together with AlternationCount=2. When sorting the columns or moving the scrollbar, performance is extremely choppy. I have uploaded a sample project that demonstrates the bug:
http://dl.dropbox.com/u/7890705/TelerikTestProject02.zip

To reproduce, just start the project and use the sorting features in the gridview and/or drag the scroll bar.

On line 471 of MainPage.xaml you will find some more comments about the issue.

I am hoping that this can be fixed in an internal build soon.

Thank you,
/Henrik

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Nov 2012, 02:23 PM
Hello,

 I've just checked your project however I don't see any performance problems with sorting. Sorting worked instantly. You can check this screencast for more info:
http://screencast.com/t/DyaLFuDJIxX

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
hwsoderlund
Top achievements
Rank 1
answered on 08 Nov 2012, 03:36 PM
Thanks for the quick reply. That is strange. For me there is a delay of at least 1-2 seconds before the sorting is activated. Did you also try using the scrollbar? For me, when I build the project with AlternationCount=2 active, there is a severe delay for each drag operation I perform with the scrollbar. With AlternationCount=2 commented out things are very smooth. By the way, I am using the following version of RadControls:
RadControls_for_Silverlight_5_2012_3_1017_Dev_hotfix
0
hwsoderlund
Top achievements
Rank 1
answered on 08 Nov 2012, 03:58 PM
That "Jing" thing made me curious. I had to try it myself. Awesome tool! Here is a quick movie of me dragging the scrollbar all the way down with AlternationCount=2 active:
http://screencast.com/t/XAJa41vkj6U

As you can see it is very choppy. Here is the same thing but with AlternationCount=2 commented out. Very smooth:
http://screencast.com/t/6ukrwMnS

/Henrik
0
Accepted
Yordanka
Telerik team
answered on 12 Nov 2012, 11:56 AM
Hi Henrik,

Generally, when you have alternation almost every operation will be slower because the grid will have to refresh all rows in order to alternate them. Also, for a better performance is recommended to avoid using RowStyle and AlternateRowStyle. You can set AlternationRowBackground instead:

<Setter Property="AlternateRowBackground" Value="{StaticResource MainBrush}" />
 
Please follow these Tips and Tricks for optimizing RadGridView's performance.
 
Greetings,
Yordanka
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
hwsoderlund
Top achievements
Rank 1
answered on 13 Nov 2012, 10:41 AM
I reworked my code to use AlternateRowBackground together with a custom row template. Performance is much better now, so thanks for the workaround.
/Henrik
Tags
GridView
Asked by
hwsoderlund
Top achievements
Rank 1
Answers by
Vlad
Telerik team
hwsoderlund
Top achievements
Rank 1
Yordanka
Telerik team
Share this question
or