RadGridView in ScrollViewer stretches the screen

I have an application that I am developing and its default size is 1440x900. I want the user to be able to scroll up and down if the application size is smaller.

I tried wrapping a ScrollView control around the main network control of the application, and it seemed to work. However, the application has many pages, and whenever I go to the one that has the RadGridView control, the RadGridView columns expand from the page.

I know that this is caused by the ScrollView control because it basically allows RadGridView to grow as much as it wants.

Is there a way to stop RadGridView controls without stopping?

+3
source share
2 answers

The Telerik RadGridView control allows row and column virtualization, where the control will recycle the controls used for each grid cell. This reduces network memory usage and also improves the handling of large amounts of data. When virtualization is turned on and the grid is not large enough to display all the data it contains, the grid will provide its own scroll bars

, RadGridView . RadGridView ScrollViewer , . , , MaxWidth MaxHeight, ScrollViewer, . EnableRowVirtualization EnableColumnVirtualization RadGridView, , , True .

: WPF- Telerik, Silverlight. , .

+1

RadGridView , . , ScrollViewer RadGridView , , , , .

, RadGridView , ( ). , RadGridView, , "" ( ), . , - , .

RadGridView, , . , , .

 <telerik:RadGridView ItemsSource="{Binding Shipments}" RowStyle="{StaticResource rowStyle}" 
                            RowDetailsVisibilityMode="Collapsed"
                            RowIndicatorVisibility="Collapsed"
                            CanUserDeleteRows="False"
                            CanUserInsertRows="False" 
                            CanUserSelect="False" telerik:StyleManager.Theme="Windows7" />

rowtemplate ( ):

<ControlTemplate x:Key="MyCustomRowTemplate" TargetType="telerik:GridViewRow">
            <Border x:Name="rowsContainer" BorderBrush="#FFA0AFC3" BorderThickness="0,0,0,1" >
                <Grid Width="Auto" HorizontalAlignment="Stretch">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <view:ActiveReleaseItemView DataContext="{Binding}" />
                </Grid>
            </Border>
</ControlTemplate>
<Style x:Key="rowStyle" TargetType="telerik:GridViewRow">
     <Setter Property="Template" Value="{StaticResource MyCustomRowTemplate}" />
</Style>
0

All Articles