Hi,
we are using the XamDataGrid in our application. We see some problems with the loading time of the form when having a lot of records.
I'm trying to use virtualization with XamDataGrid but I think I'm doing something wrong.
When enabling the virtualization properties it doesnt perform better.
xamDataGrid.FieldSettings.AllowCellVirtualization = true;
xamDataGrid.FieldSettings.AllowLabelVirtualization = true;
xamDataGrid.RecordContainerGenerationMode = Infragistics.Windows.Controls.ItemContainerGenerationMode.Virtualize;
xamDataGrid.RecordLoadMode = RecordLoadMode.PreloadRecords;
When I embed the XamDataGrid into a VirtualizingStackPanel it does perform well. I gain 50% performance but the grid isn't visible. Why? I don't know yet.
VirtualizingStackPanel _performancePanel = new VirtualizingStackPanel();
_performancePanel = new VirtualizingStackPanel();
Setter setter = new Setter();
setter.Property = VirtualizingStackPanel.VirtualizationModeProperty;
setter.Value = VirtualizationMode.Recycling;
Style style = new Style();
style.Setters.Add(setter);
setter.Property = VirtualizingStackPanel.IsVirtualizingProperty;
setter.Value = true;
xamDataGrid.Style = style;
_performancePanel.Children.Add(xamDataGrid);
_performancePanel.IsItemsHost = true;
this.Content = xamDataGrid;
Can you help me using Virtualization the right way?
With kind regards,
Patrick
Hi Patrick,
Please refer to the blog posts below for guidance on how to improve the performance of the XamDataGrid. They illustrate the impact of different settings on performance using sample projects you can download and run on your machine to see the optimized performance you can expect from the XamDataGrid.
http://blogs.infragistics.com/blogs/kiril_matev/archive/2010/10/26/optimizing-xamdatagrid-performance.aspx
http://blogs.infragistics.com/blogs/kiril_matev/archive/2011/07/07/optimizing-infragistics-wpf-controls-startup-time.aspx
Best,
Kiril
note: I want to use UI Virtualization and not Data Virtualisation