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

RadGridView Rows Cut Off By Parent Grid

1 Answer 405 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 25 Mar 2016, 11:29 PM
I have some RadGridViews in a Grid with some other controls,once I add enough rows in the GrdSupplyAirAnalysis data grid the last row(s) start to cut off.  If I have 125 rows or more several rows are completely cut off.  The scrollbar has no effect, it doesn't think that it is necessary as it is disabled with set to visible.

 

How can I configure this so that the full contents are viewable, whether by having the parent grid's cell expand to accommodate it or have the scroll bar actually be scrollable?

 

Any help here would be greatly appreciated!

 

Thanks!

 

<controls:ReportTabBase x:Class="AtcReportManager.Controls.Cleanrooms.CleanroomRoomView"
        xmlns:local="clr-namespace:AtcReportManager.Controls.Reports"
        xmlns:cr="clr-namespace:AtcReportManager.Controls.Cleanrooms"
        xmlns:rc="clr-namespace:AtcReportManager.Controls.ReportComponents"
        xmlns:converters="clr-namespace:AtcReportManager.Converters"                        
        xmlns:fh="clr-namespace:AtcReportManager.Controls.FumeHoodComponents"
        xmlns:controls="clr-namespace:AtcReportManager.Controls"
        mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="1400"
        Height="auto" Width="auto" Header="{Binding RoomName}">
    <controls:ReportTabBase.Resources>
        <Thickness x:Key="LabelMargin">5,0,0,0</Thickness>
    </controls:ReportTabBase.Resources>
    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>
            <controls:ReportLabelTextBlock Grid.Row="0" Grid.Column="0" Text="Room Name" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding RoomName}" HorizontalAlignment="Stretch" VerticalAlignment="Center" HorizontalContentAlignment="Stretch"/>
            <controls:ReportLabelTextBlock Grid.Row="0" Grid.Column="2" Text="Room Area (ft2)" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <TextBox Grid.Row="0" Grid.Column="3"  HorizontalAlignment="Stretch" VerticalAlignment="Center" HorizontalContentAlignment="Center" MinWidth="30" Margin="{StaticResource StdRptMargin}">
                <TextBox.Text>
                    <Binding Path="RoomAreaSqFt">
                        <Binding.Converter>
                            <converters:DoubleToDisplayConverter NumDecimals="2"/>
                        </Binding.Converter>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <controls:ReportLabelTextBlock Grid.Row="0" Grid.Column="4" Text="Room Volume (ft3)" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <TextBox Grid.Row="0" Grid.Column="5"  HorizontalAlignment="Stretch" VerticalAlignment="Center" HorizontalContentAlignment="Center" MinWidth="30" Margin="{StaticResource StdRptMargin}">
                <TextBox.Text>
                    <Binding Path="RoomVolumeCubicFeet">
                        <Binding.Converter>
                            <converters:DoubleToDisplayConverter NumDecimals="2"/>
                        </Binding.Converter>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <controls:ReportLabelTextBlock Grid.Row="1" Grid.Column="0" Text="Pressure Type" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <telerik:RadComboBox Grid.Row="1" Grid.Column="1" ItemsSource="{Binding AvailablePressureTypes}" SelectedValue="{Binding PressureType}" VerticalAlignment="Center" MinWidth="30"
                      Margin="{StaticResource StdRptMargin}" HorizontalContentAlignment="Center" SelectedValuePath="Key" DisplayMemberPath="Value"/>
            <controls:ReportLabelTextBlock Grid.Row="1" Grid.Column="2" Text="Occupancy Mode" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <telerik:RadComboBox Grid.Row="1" Grid.Column="3" ItemsSource="{Binding AvailableOccupancyModeTypes}" SelectedValue="{Binding OccupancyMode}" VerticalAlignment="Center" MinWidth="30"
                      Margin="{StaticResource StdRptMargin}" HorizontalContentAlignment="Center" SelectedValuePath="Key" DisplayMemberPath="Value"/>
            <controls:ReportLabelTextBlock Grid.Row="1" Grid.Column="4" Text="ISO Class" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <telerik:RadComboBox Grid.Row="1" Grid.Column="5" ItemsSource="{Binding AvailableIsoClassTypes}" SelectedValue="{Binding IsoClass}" VerticalAlignment="Center" MinWidth="30"
                      Margin="{StaticResource StdRptMargin}" HorizontalContentAlignment="Center" SelectedValuePath="Key" DisplayMemberPath="Value"/>
            <CheckBox Grid.Row="2" Grid.Column="0" IsChecked="{Binding CertifiedToIso14644}"   Content="ISO 14644-1" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top"/>
            <CheckBox Grid.Row="2" Grid.Column="1" IsChecked="{Binding CertifiedToCag003}" Content="CAG-003-2006" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top"/>
            <CheckBox Grid.Row="2" Grid.Column="2" IsChecked="{Binding IncludeLight}"   Content="Include Light" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top"/>
            <CheckBox Grid.Row="2" Grid.Column="3" IsChecked="{Binding IncludeSound}" Content="Include Sound" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top"/>
            <controls:ReportLabelTextBlock Grid.Row="3" Grid.Column="0" Text="# PC Locations" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <TextBox Grid.Row="3" Grid.Column="1"  HorizontalAlignment="Stretch" VerticalAlignment="Center" HorizontalContentAlignment="Center" MinWidth="30" Margin="{StaticResource StdRptMargin}">
                <TextBox.Text>
                    <Binding Path="NumPcCounts">
                        <Binding.Converter>
                            <converters:IntToNAConverter />
                        </Binding.Converter>
                    </Binding>
                </TextBox.Text>
            </TextBox>
 
            <CheckBox Grid.Row="3" Grid.Column="3" IsChecked="{Binding IsPaoChallenge}"   Content="PAO Challenge" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Checked="WhenPaoCheckChanged" />
            <CheckBox Grid.Row="3" Grid.Column="4" IsChecked="{Binding IsPslChallenge}"   Content="PSL Challenge" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Checked="WhenPslCheckChanged"/>
            <CheckBox Grid.Row="3" Grid.Column="5" IsChecked="{Binding DoLeakTest}"   Content="No Challenge" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Checked="WhenDoLeakTestCheckChanged"/>
            <!--<RadioButton Grid.Row="3" Grid.Column="3" GroupName="LeakChallenge" Content="PAO Challenge" IsChecked="{Binding IsPaoChallenge}"/>
            <RadioButton Grid.Row="3" Grid.Column="4" GroupName="LeakChallenge" Content="PSL Challenge" IsChecked="{Binding IsPsLChallenge}"/>
            <RadioButton Grid.Row="3" Grid.Column="5" GroupName="LeakChallenge" Content="No Challenge" IsChecked="{Binding DoLeakTest}"/>-->
 
            <controls:ReportLabelTextBlock Grid.Row="4" Grid.Column="0" Text="Temperature (°F)" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <TextBox Grid.Row="4" Grid.Column="1"  HorizontalAlignment="Stretch" VerticalAlignment="Center" HorizontalContentAlignment="Center" MinWidth="30" Margin="{StaticResource StdRptMargin}">
                <TextBox.Text>
                    <Binding Path="TemperatureDegreesFahrenheit">
                        <Binding.Converter>
                            <converters:DoubleToDisplayConverter NumDecimals="2"/>
                        </Binding.Converter>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <controls:ReportLabelTextBlock Grid.Row="4" Grid.Column="2" Text="Relative Humidity (%)" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <TextBox Grid.Row="4" Grid.Column="3"  HorizontalAlignment="Stretch" VerticalAlignment="Center" HorizontalContentAlignment="Center" MinWidth="30" Margin="{StaticResource StdRptMargin}">
                <TextBox.Text>
                    <Binding Path="RelativeHumidityPct">
                        <Binding.Converter>
                            <converters:DoubleToDisplayConverter NumDecimals="2"/>
                        </Binding.Converter>
                    </Binding>
                </TextBox.Text>
            </TextBox>
 
            <controls:ReportLabelTextBlock Grid.Row="4" Grid.Column="4" Text="# Laskin Nozzles" Margin="{StaticResource LabelMargin}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            <TextBox Grid.Row="4" Grid.Column="5"  HorizontalAlignment="Stretch" VerticalAlignment="Center" HorizontalContentAlignment="Center" MinWidth="30" Margin="{StaticResource StdRptMargin}">
                <TextBox.Text>
                    <Binding Path="NumLaskinNozzles">
                        <Binding.Converter>
                            <converters:IntToNAConverter />
                        </Binding.Converter>
                    </Binding>
                </TextBox.Text>
            </TextBox>
 
            <Grid Grid.Row="5" Grid.ColumnSpan="10">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border Grid.Row="0" Grid.Column="0"  BorderBrush="{DynamicResource StdBorderBrush}" BorderThickness="2 2 2 0"/>
                <Border Grid.Row="1" Grid.Column="0"  BorderBrush="{DynamicResource StdBorderBrush}" BorderThickness="2"/>
                <controls:ReportComponentHeaderTextBlock Grid.Row="0" Grid.Column="0"  Margin="{StaticResource StdRptMargin}"
                   Text="Particle Count Analysis" HorizontalAlignment="Center" VerticalAlignment="Center" />
                <controls:ReportComponentHeaderTextBlock Grid.Row="0" Grid.Column="1"  Margin="{StaticResource StdRptMargin}"
                   Text="Supply Air Analysis" HorizontalAlignment="Center" VerticalAlignment="Center" />
                <telerik:RadGridView x:Name="GrdPcAnalysis" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1" HorizontalAlignment="Stretch" Margin="{StaticResource StdRptMargin}"
                                 IsFilteringAllowed="False" AutoGenerateColumns="False" CanUserInsertRows="True" CanUserDeleteRows="True" NewRowPosition="Top"
                                 CanUserFreezeColumns="False" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserSortGroups="False" ShowGroupPanel="False"
                                 AddingNewDataItem="WhenNewPcObjectItemAdded" RowEditEnded="WhenParticleCountRowEditEnded">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn Header="Location" DataMemberBinding="{Binding ParticleCountId}" IsReadOnly="True" HeaderTextAlignment="Center" TextAlignment="Center" />
                        <telerik:GridViewDataColumn Header="µm/ft3 >= 0.5" DataMemberBinding="{Binding PcPoint5CountMicroMeterPerCubicFeet, Converter={converters:DoubleToNAConverter}}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="µm/m3 >= 0.5" DataMemberBinding="{Binding PcPoint5CountMicroMeterPerCubicMeter, Converter={converters:DoubleToIntConverter}}" IsReadOnly="True" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="µm/ft3 >= 5.0" DataMemberBinding="{Binding Pc5PointCountMicroMeterPerCubicFeet, Converter={converters:DoubleToNAConverter}}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="µm/m3 >= 5.0" DataMemberBinding="{Binding Pc5PointCountMicroMeterPerCubicMeter, Converter={converters:DoubleToIntConverter}}" IsReadOnly="True" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="Light (ft cd)" DataMemberBinding="{Binding LightFtCandles, Converter={converters:DoubleToIntConverter}}" IsVisible="{Binding IncludeLight}"  HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="Sound dbA" DataMemberBinding="{Binding SounddbA, Converter={converters:DoubleToIntConverter}}" IsVisible="{Binding IncludeSound}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
                <Border Grid.Row="0" Grid.Column="1"  BorderBrush="{DynamicResource StdBorderBrush}" BorderThickness="2 2 2 0"/>
                <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2"  BorderBrush="{DynamicResource StdBorderBrush}" BorderThickness="2"/>
                <telerik:RadGridView x:Name="GrdSupplyAirAnalysis" Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" HorizontalAlignment="Stretch" Margin="{StaticResource StdRptMargin}"
                                 IsFilteringAllowed="False" AutoGenerateColumns="False" CanUserInsertRows="True" CanUserDeleteRows="True" NewRowPosition="Top"
                                 CanUserFreezeColumns="False" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserSortGroups="False" ShowGroupPanel="False"
                                 BeginningEdit="GrdSupplyAirAnalysisBeginningEdit" CellEditEnded="GrdSupplyAirAnalysisCellEditEnded"
                                 AddingNewDataItem="WhenNewSupplyFilterDataItemAdded" RowEditEnded="WhenSupplyFilterRowEditEnded"
                                 ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Visible">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn Header="Location" DataMemberBinding="{Binding FilterId}" IsReadOnly="True" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="V.G. 1" DataMemberBinding="{Binding VelGridReading1, Converter={converters:DoubleToNAConverter}}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="V.G. 2" DataMemberBinding="{Binding VelGridReading2, Converter={converters:DoubleToNAConverter}}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="Filter Area (ft2)" DataMemberBinding="{Binding FilterAreaSqFt, Converter={converters:DoubleToNAConverter}}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="RSD" DataMemberBinding="{Binding RelativeStandardDeviation, Converter={converters:RsdConverter}}" IsReadOnly="True" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="CFM" DataMemberBinding="{Binding FilterCfm, Converter={converters:DoubleToIntConverter}}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="Leak Challenge" DataMemberBinding="{Binding PslDisplayString}" IsReadOnly="True" IsVisible="{Binding IsPslChallenge}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="Leak Challenge" DataMemberBinding="{Binding FilterLeakChallengeMicroGramsPerLiter, Converter={converters:LeakChallengeConverter}}" IsReadOnly="True" IsVisible="{Binding IsPaoChallenge}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                        <telerik:GridViewDataColumn Header="% Leak Detected" DataMemberBinding="{Binding SigLeakDetectedPct, Converter={converters:DoubleToNAConverter}}" IsVisible="{Binding ShowLeakTestResult}" HeaderTextAlignment="Center" TextAlignment="Center"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
                <cr:RoomRemarksView x:Name="RemarksView"  Grid.Row="2" Grid.Column="0" Margin="{StaticResource StdRptMargin}"/>
                <telerik:RadExpander Header="Validation" Grid.Row="3" IsExpanded="{Binding IsValidationSectionExpanded}"
                             Grid.ColumnSpan="20" telerik:AnimationManager.IsAnimationEnabled="True" Visibility="Visible">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <telerik:RadGridView x:Name="GrdValidation" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5" HorizontalAlignment="Stretch" Margin="{StaticResource StdRptMargin}"
                                     IsFilteringAllowed="False" AutoGenerateColumns="False" CanUserInsertRows="False" CanUserDeleteRows="False" NewRowPosition="Top"
                                     CanUserFreezeColumns="False" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserSortGroups="False" ShowGroupPanel="False">
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn Header="Component" DataMemberBinding="{Binding Component}"/>
                                <telerik:GridViewDataColumn Header="Element" DataMemberBinding="{Binding ValidationItemName}"/>
                                <telerik:GridViewDataColumn Header="Issue" DataMemberBinding="{Binding ValidationFailureDescription}"/>
                                <telerik:GridViewDataColumn Header="Severity" DataMemberBinding="{Binding ValidationResult}"/>
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>
                    </Grid>
                </telerik:RadExpander>
            </Grid>
        </Grid>
    </ScrollViewer>
</controls:ReportTabBase>

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 28 Mar 2016, 01:32 PM
Hello James,

I highly recommend having a look at the Tips and Tricks article of our documentation for more information on the matter.

As stated there, you should avoid placing RadGridView in controls/panels which will measure it with infinity as in such cases, virtualization turns off. For example, ScrollViewer, StackPanel and Grid with Row.Height=Auto or Column.Width=Auto will measure with infinity.

In your particular case, removing the ScrollViewer and setting star-based or fixed widths and heights for the rows and columns containing the GridViews should produce the desired behavior and also boost performance.

I hope you find this information helpful.

Regards,
Dilyan Traykov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
James
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or