GridView scrolling really slow and sometime stuck at one place!

8 posts, 1 answers
  1. Lantu Datinh
    Lantu Datinh avatar
    16 posts
    Member since:
    Jul 2009

    Posted 14 Sep 2011 Link to this post

    Hi All,

    The scenario is:
    I have a gridview that consist rowdetailtemplate, the level of rowdetailtemplate is 3.
    However, whenever the first rowdetail is expanded, scrolling face many difficulty, the performance of the grid really slow.

    Please see the sample code in the attachment.


    The number of record for each level is just less than 100 rows.
    Please help me to come up with how to make the grid scroll faster.
    Thanks a lot.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 14 Sep 2011 Link to this post

    Hi,

     Please specify Height for all child grids to avoid such problems. 

    Kind regards,
    Vlad
    the Telerik team

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

  3. Lantu Datinh
    Lantu Datinh avatar
    16 posts
    Member since:
    Jul 2009

    Posted 14 Sep 2011 Link to this post

    Hi Vlad,

    I've have try to set the height for inner grids, the performance is better, but still some delay when scrolling from the the inner grid to outer grid. Thanks for your help.

    However, i think that it is not quite a solution. Since each sub gridview has its own height, therefore scrollbar also visible.
    It is quite funny if from the main grid we scroll to the subgrid, and then have to scroll again within the subgrid to view its data.

    Could you help to check if there is any better solution?
    (I'm thinking if telerik support some kind of static data, which means each row did not have to initialize again everytime).

    Thanks.


  4. Lantu Datinh
    Lantu Datinh avatar
    16 posts
    Member since:
    Jul 2009

    Posted 20 Sep 2011 Link to this post

    Anyone who can help how to keep the current state of RADGRIDVIEW? which will not load each row again and again as scrolling?
    If i put the radgridview into a ScrollViewer, everything fine, scrolling is fast, however, i have faced the layout issue since there will be two scrollViewer (in the grid and of the outer scrollviewer).

    Please help!
    Thanks a lot.
  5. Lantu Datinh
    Lantu Datinh avatar
    16 posts
    Member since:
    Jul 2009

    Posted 04 Oct 2011 Link to this post

    Help please !!!
  6. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 05 Oct 2011 Link to this post

    Hi Lantu Datinh,

    I strongly suggest you to not use UI virtual components like ListBox, DataGrid, RadGridView, etc. inside StackPanel, ScrollViewer, etc. This containers will measure with infinity which will case UI virtualization to create all elements for all data items - you may get huge performance problems. As to the grid hierarchical scrolling the approach I've suggested you is the only way to achieve your goal currently. RadGridView does not support something like hierarchical virtualization where only the root grid will have scrollbar.

    Best wishes,
    Vlad
    the Telerik team

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

  7. Lantu Datinh
    Lantu Datinh avatar
    16 posts
    Member since:
    Jul 2009

    Posted 18 Oct 2011 Link to this post

    Now I could not come up with any better solution. Even if we set the child grid high, the scroll speed really slow.
    Currently, for the child grid, i chose to use DataPager.
    Considering this is a stuck issue, however, I would mark the latest post by Vlad as temporary answer to this.

    Thanks Vlad.
    Hope that someone would come up with better answers.
  8. JJ Loubser
    JJ Loubser avatar
    42 posts
    Member since:
    Jul 2009

    Posted 08 Feb 2012 Link to this post

    we have done all this but still slow scrolling and stuck:
    • The GridView is placed in a control that measures its children with infinity - such controls are ScrollViewer, StackPanel (when vertical it measures with infinite height and when horizontal - with infinite width), and Grid with RowDefinition Height="Auto" or ColumnDefinition Width="Auto". When RadGridView (or any other grid) is measured with infinity virtualization is turned off which results in reduced performance. Modify your code so that RadGridView is placed in a container that will not measure it with infinity and the performance will be back to normal.
    • Binding to complex properties - If you bind to complex property (sub property) the RadGridView have to use bindings to get the value for the cell. The better performance will be achieved if you bind to a simple property because we will use lambda to get the value. Using lambdas is much faster than bindings.
    • Converters - using converters will slow you down because RadGridView will call them.
    • CellTemplates - using CellTemplates is a time consuming operation. If applicable, try to stick to the Default Templates.
    • AlternateRowStyle - using AlternateRowStyle is a time consuming operation. If you just need to set the background of the alternating rows we recommend using the AlternateRowBackground property.
    • RowStyle - using the RowStyle is a time consuming operation (but was the only alternative in Silverlight 3). Please use implicit styles

    -----------

    could it be our implicit styles, we change some colors only?
    could it be that we are still using version 2011.1.419.1040?
Back to Top