Hello,
I am using the Q3 2013 Telerik release (2013.3.1016). I am doing a simple binding to the DefaultView of a DataTable. Due to the nature of the requirement, I need to have AutoGenerateColumns set to true, but I'm really not doing anything special otherwise.
What I'm noticing is that when bound to the DefaultView of a DataTable with just 200 rows and 4 columns, the scrolling performance is so bad as to be unusable. It's extremely jerky and very slow, again to the point of being completely unusable. When I bind directly to the same DataTable (without using the DefaultView), there is absolutely no problem with scrolling - it is smooth and seamless.
I've tried everything that I can think of to improve performance, including everything on your RadGridView "Performance Tips and Tricks" at:
http://www.telerik.com/help/wpf/radgridview-performance-tips-tricks.html. The reason that I need to use the DefaultView is for the data binding and error features implemented on the DataView but not the DataTable. I've tried all sorts of hacks with changing data in the DataTable from my ViewModel, firing an event that my codebehind subscribes to, and constantly calling Rebind() on the RadGridView, but I'm still left with issues that require no effort when simply bound to the DefaultView. There just has to be a way to achieve smooth scrolling with a meager 200 rows and 4 columns.
1: The RadGridView is in a Grid with the row height set to star and the column width set to star. There is no "infinity" based measurement going on.
2: I have EnableRowVirtualization set to "True", and I've confirmed that this is working using WPF Inspector (similar to Snoop). Furthermore, I've turned virtualization off, and although scrolling performance becomes perfectly smooth even with the DefaultView, memory usage becomes absurdly high. I will need to keep virtualization on.
3: Originally I had the property bound as part of the DataTable, like this: ItemsSource="{Binding MyDataTable.DefaultView}". After reading your tips and tricks regarding not using property paths to improve performance, I exposed the DefaultView directly on my ViewModel so that the binding became ItemsSource="{Binding MyDefaultView}". This did not improve performance at all.
4: I'm not using any custom styles or templates at all.
5: My WPF application is globally using the Windows8 Theme (StyleManager.ApplicationTheme = new Windows8Theme() is right before InitalizeComponent() on my MainWindow.xaml.cs, also per your documentation). According to your "Tips and Tricks", this uses "lightweight templates" that should improve performance, but again, testing with different themes produces the same terrible scrolling performance.
6: I've tried using ScrollMode="Deferred", but the behavior is not desirable, and even when letting go of the mouse to let the GridView render, there is a very long pause while the data renders.
7: Paging is not a viable solution here and can't be used for several reasons, the most important of which is that the users want to view this GridView like they would in Excel.
With all that in mind, here is the XAML for my RadGridView (note that ImportDataView is the DefaultView of my DataTable, exposed directly from the ViewModel):
I've spent a ton of time trying to figure this out and could really use some help.
Thanks for your time,
Jon
I am using the Q3 2013 Telerik release (2013.3.1016). I am doing a simple binding to the DefaultView of a DataTable. Due to the nature of the requirement, I need to have AutoGenerateColumns set to true, but I'm really not doing anything special otherwise.
What I'm noticing is that when bound to the DefaultView of a DataTable with just 200 rows and 4 columns, the scrolling performance is so bad as to be unusable. It's extremely jerky and very slow, again to the point of being completely unusable. When I bind directly to the same DataTable (without using the DefaultView), there is absolutely no problem with scrolling - it is smooth and seamless.
I've tried everything that I can think of to improve performance, including everything on your RadGridView "Performance Tips and Tricks" at:
http://www.telerik.com/help/wpf/radgridview-performance-tips-tricks.html. The reason that I need to use the DefaultView is for the data binding and error features implemented on the DataView but not the DataTable. I've tried all sorts of hacks with changing data in the DataTable from my ViewModel, firing an event that my codebehind subscribes to, and constantly calling Rebind() on the RadGridView, but I'm still left with issues that require no effort when simply bound to the DefaultView. There just has to be a way to achieve smooth scrolling with a meager 200 rows and 4 columns.
1: The RadGridView is in a Grid with the row height set to star and the column width set to star. There is no "infinity" based measurement going on.
2: I have EnableRowVirtualization set to "True", and I've confirmed that this is working using WPF Inspector (similar to Snoop). Furthermore, I've turned virtualization off, and although scrolling performance becomes perfectly smooth even with the DefaultView, memory usage becomes absurdly high. I will need to keep virtualization on.
3: Originally I had the property bound as part of the DataTable, like this: ItemsSource="{Binding MyDataTable.DefaultView}". After reading your tips and tricks regarding not using property paths to improve performance, I exposed the DefaultView directly on my ViewModel so that the binding became ItemsSource="{Binding MyDefaultView}". This did not improve performance at all.
4: I'm not using any custom styles or templates at all.
5: My WPF application is globally using the Windows8 Theme (StyleManager.ApplicationTheme = new Windows8Theme() is right before InitalizeComponent() on my MainWindow.xaml.cs, also per your documentation). According to your "Tips and Tricks", this uses "lightweight templates" that should improve performance, but again, testing with different themes produces the same terrible scrolling performance.
6: I've tried using ScrollMode="Deferred", but the behavior is not desirable, and even when letting go of the mouse to let the GridView render, there is a very long pause while the data renders.
7: Paging is not a viable solution here and can't be used for several reasons, the most important of which is that the users want to view this GridView like they would in Excel.
With all that in mind, here is the XAML for my RadGridView (note that ImportDataView is the DefaultView of my DataTable, exposed directly from the ViewModel):
<
telerik:RadGridView
Name
=
"PreviewDataGridView"
ItemsSource
=
"{Binding ImportDataView}"
EnableRowVirtualization
=
"True"
SelectionMode
=
"Extended"
SelectionUnit
=
"Mixed"
IsReadOnly
=
"False"
AutoGenerateColumns
=
"True"
ShowGroupPanel
=
"False"
ShowInsertRow
=
"False"
ReorderColumnsMode
=
"None"
CanUserInsertRows
=
"False"
CanUserDeleteRows
=
"True"
CanUserResizeRows
=
"False"
CanUserSelect
=
"True"
CanUserSortColumns
=
"False"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
IsFilteringAllowed
=
"False"
BorderBrush
=
"Black"
BorderThickness
=
"1"
Margin
=
"4, 6, 4, 4"
Grid.Row
=
"2"
Grid.Column
=
"0"
>
</
telerik:RadGridView
>
I've spent a ton of time trying to figure this out and could really use some help.
Thanks for your time,
Jon