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

Scrolling for RadGridView slow

5 Answers 494 Views
GridView
This is a migrated thread and some comments may be shown as answers.
StackOverflowed
Top achievements
Rank 1
StackOverflowed asked on 21 Oct 2010, 08:21 PM
I'm binding the RadGridView to an ObservableCollection of about 1,000 items or so. I have both Row and Column Virtualization turned on. When I'm displaying my grid cells as plain TextBlocks, the realtime scrolling performance is pretty decent (Immediate scrolling is not an option). But once I start using more complex templates, like my own custom editors, scrolling performance suffers greatly, and becomes very choppy. The grid definition looks something like:

   <telerik:RadGridView
                         ItemsSource="{Binding MyItemsSource}"
                         ScrollMode="RealTime"
                         SelectionMode="Extended"
                         AutoGenerateColumns="False"
                         EnableColumnVirtualization="True"
                         EnableRowVirtualization="True">

and the columns looks like:

 <telerik:GridViewDataColumn Header="Price">

                <telerik:GridViewDataColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Price.Value}" />
                    </DataTemplate>
                </telerik:GridViewDataColumn.CellTemplate>

            </telerik:GridViewDataColumn>

Even if I keep the entire grid as TextBlocks but just make even a couple of columns TextBoxes, the scrolling performance starts to degrade fairly quickly. If  I disable both row and column Virtualization completely, then the grid scrolls very fast, but starts to take up a lot of memory (because it's instantiating all of the visual trees, it's something around 1GB memory usage). Are there any other settings that can help with the scrolling performance, or anything else that I can do ? I've found the grid very performant is almost all other scenarios, and it would be a shame to discard an otherwise well performing grid because of lackluster scrolling.

5 Answers, 1 is accepted

Sort by
0
Leo
Top achievements
Rank 2
answered on 21 Oct 2010, 08:32 PM
Why not try adding a pager so that even if you have loads of data, your scrolling will not be affected. Might be affected because of the custom style? 
0
StackOverflowed
Top achievements
Rank 1
answered on 21 Oct 2010, 08:34 PM
Unfortunately a pager isn't acceptable for the type of UI that's being developed.
0
Vlad
Telerik team
answered on 22 Oct 2010, 07:36 AM
Hello,

 You may need to use custom columns with caching. Please check this thread for more info.

Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
StackOverflowed
Top achievements
Rank 1
answered on 22 Oct 2010, 02:29 PM
Thanks for that, I will look into it. The post also mentions that improvements were made to the Silverlight grid in terms of scrolling, and that it is in a beta version. Have those changes also been integrated into the WPF version? (I know you have the same codebase for both WPF and Silverlight, so I'd assume yes). I'm currently evaluating your suite of controls, is there a way for me to procure that beta build?

Thanks
0
Milan
Telerik team
answered on 25 Oct 2010, 07:04 AM
Hi StackOverflowed,

We do have a shared codebase and the improvement that you are referring to is also available for WPF. You can check out our beta by downloading the installation package from here (WPF or Silverlight).


Regards,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
StackOverflowed
Top achievements
Rank 1
Answers by
Leo
Top achievements
Rank 2
StackOverflowed
Top achievements
Rank 1
Vlad
Telerik team
Milan
Telerik team
Share this question
or