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

6 posts, 1 answers
  1. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 08 Nov 2012 Link to this post

    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
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 08 Nov 2012 Link to this post

    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.

  3. DevCraft banner
  4. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 08 Nov 2012 Link to this post

    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
  5. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 08 Nov 2012 Link to this post

    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
  6. Answer
    Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 12 Nov 2012 Link to this post

    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.

  7. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 13 Nov 2012 Link to this post

    I reworked my code to use AlternateRowBackground together with a custom row template. Performance is much better now, so thanks for the workaround.
    /Henrik
Back to Top
DevCraft banner