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

Merging multiple GridViews under virtualizing scrollviewer

1 Answer 289 Views
GridView
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 23 May 2018, 11:44 AM

This seems impossible to me, but let's see if someone has an idea how to manage the following situation:

<ScrollViewer>
   <StackPanel>
      <telerik:RadGridView />
      <telerik:RadGridView />
   </StackPanel>
</ScrollViewer>

 

Now if both GridViews contain alot of rows (lets say thousands...), the performance would be just horrible. What I obviously could do, is set the MaxHeight property for the GridViews to get the built in Virtualization working, but that would result in nested Scrollbars and in 2018 we just don't want that.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 28 May 2018, 08:29 AM
Hello Petri,

When RadGridView is measured with Infinity, UI virtualization is turned off which results in degraded performance. This can happen when it is placed inside a control that measures its children with infinity, such as a ScrollViewer or a StackPanel.

What I can suggest is to replace the ScrollViewer and StackPanel with a Grid and define two RowDefinitions, with a Height of *, if you find such a setup applicable.

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="*" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <telerik:RadGridView />
    <telerik:RadGridView Grid.Row="1" />
</Grid>

If that is not the case, the only other suggestion I can offer is to set fixed heights as you've already done.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
n/a
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or