Hi,
I saw this text on a Tips and Tricks page (http://www.telerik.com/help/silverlight/radgridview-performance-tips-tricks.html):
Try not to place RadGridView in controls/panels which will measure it with infinity. For example, ScrollViewer, StackPanel and Grid with Row.Height=Auto or Column.Width=Auto will measure with infinity. If RadGridView is measured with infinity the virtualization turns off. Also setting RadGridView.ColumnWidth to a specific width (like 100) will increase both horizontal & vertical scrolling performance. Auto is a little bit slower and Star is the slowest (most noticeable when you have a lot of columns).
What I normally do, is this:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto " />
<RowDefinition Height="*" />
<RowDefinition Height="Auto " />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Custom ToolBar Grid.Row="0" />
<RadGridView Grid.Row="1" />
<StatusBar Grid.Row="2" />
</Grid>
But it seems that the tip-and-trick above tells me that this is a bad idea when it comes to performance.
But I am bit at a loss on what to do, then. I want the GridView how have only the available space. If I cannot use the stackpanel or grid, then how? Dockpanel?
I've googled a lot of answers to problems with infinity, but has been unable to spot a solution without Auto or Star.. Seems like everyone knows how to fix it without having it spelled out.. like me :-) ... Help will be appreciated!
I saw this text on a Tips and Tricks page (http://www.telerik.com/help/silverlight/radgridview-performance-tips-tricks.html):
Try not to place RadGridView in controls/panels which will measure it with infinity. For example, ScrollViewer, StackPanel and Grid with Row.Height=Auto or Column.Width=Auto will measure with infinity. If RadGridView is measured with infinity the virtualization turns off. Also setting RadGridView.ColumnWidth to a specific width (like 100) will increase both horizontal & vertical scrolling performance. Auto is a little bit slower and Star is the slowest (most noticeable when you have a lot of columns).
What I normally do, is this:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto " />
<RowDefinition Height="*" />
<RowDefinition Height="Auto " />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Custom ToolBar Grid.Row="0" />
<RadGridView Grid.Row="1" />
<StatusBar Grid.Row="2" />
</Grid>
But it seems that the tip-and-trick above tells me that this is a bad idea when it comes to performance.
But I am bit at a loss on what to do, then. I want the GridView how have only the available space. If I cannot use the stackpanel or grid, then how? Dockpanel?
I've googled a lot of answers to problems with infinity, but has been unable to spot a solution without Auto or Star.. Seems like everyone knows how to fix it without having it spelled out.. like me :-) ... Help will be appreciated!