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.
7 Answers, 1 is accepted
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 >>
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.
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.
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 >>
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.
- 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?