details disappear when row scrolled

2 posts, 0 answers
  1. David Ocasio
    David Ocasio avatar
    160 posts
    Member since:
    Nov 2009

    Posted 28 Jun 2019 Link to this post

    I have a gridview with another gridview embedding in the detail.

    When a row is opened and the detail is displayed the grid shows fine.

    When the horizonal scroll bar is used the detail grid will disappear regardless to how many columns are still needed to display in the detail.

    Please see bellow gridviews and screenshots attached

    <telerik:RadGridView Grid.Column="0" CanUserSelect="False"
                                         Visibility="{Binding ShowMSD,Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                          IsBusy="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.IsBusy}"
                                         FilterOperatorsLoading="OnFilterOperatorsLoading"
                                         IsTabStop="False" AutoGenerateColumns="False" AlternateRowBackground="Gainsboro"
                                         AlternationCount="2" RowDetailsTemplate="{StaticResource BrowseDetailTemplate}"
                                         ShowColumnFooters="False"  FontSize="16" GridLinesVisibility="Both" ShowColumnHeaders="True"
                                         ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" IsReadOnly="True" Margin="0,8"
                                         ItemsSource="{Binding FilteredXrefStockLevels}"
                                         FrozenColumnsSplitterVisibility="Collapsed" EnableRowVirtualization="True" EnableColumnVirtualization="True"
                                         IsFilteringAllowed="True" x:Name="GridViewItems"
                                         CanUserSortColumns="True" >
     
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="RowDetailsVisibilityChanged">
                                <command:EventToCommand PassEventArgsToCommand="True"
                                      Command="{Binding LoadAllStockCommand, Mode=OneWay}" />
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
     
     
                        <telerik:RadGridView.Columns>
     
                            <telerik:GridViewDataColumn IsFilterable="False" IsSortable="False" MinWidth="0" HeaderTextAlignment="Center" >
                                <telerik:GridViewDataColumn.Header >
                                    <TextBlock Text="" Margin="0" Padding="0" />
                                </telerik:GridViewDataColumn.Header>
                                <telerik:GridViewDataColumn.CellTemplate>
                                    <DataTemplate >
                                        <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="Auto" >
                                            <CheckBox d:DataContext="{d:DesignInstance vm:ItemManfXrefStockLevel}"
                                                      telerik:TouchManager.TouchMode="None"
                                                    IsChecked="{Binding IsSelected,Mode=TwoWay}"
                                                      HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                                    >
     
                                                <!--<CheckBox.LayoutTransform>
                                                    <ScaleTransform ScaleX="2" ScaleY="2" />
                                                </CheckBox.LayoutTransform>-->
                                            </CheckBox>
                                        </Grid>
                                    </DataTemplate>
                                </telerik:GridViewDataColumn.CellTemplate>
                            </telerik:GridViewDataColumn>
     
                            <ctrls:InoToggleColumn DataMemberBinding="{Binding DetailExpanded}" />
     
     
                            <!-- Part Number -->
                            <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="ColPartNumber"
                                DataMemberBinding="{Binding Z_No}">
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Orientation="Vertical" Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PartNumberColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PartNumberColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
                             
     
                            <!-- Description -->
                            <telerik:GridViewDataColumn Width="*" MinWidth="300" ShowDistinctFilters="False" x:Name="ColDesc"
                                DataMemberBinding="{Binding Desc}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.DescriptionColName}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
                            <!-- Name Manf -->
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding NameManf}" UniqueName="NameManf" ShowDistinctFilters="False" IsVisible="{Binding Source={StaticResource Locator},Path=SettingsService.IsMasterManfManfNo}" >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Orientation="Vertical" Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.NameManfFieldName}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
     
                            <!-- Manfno -->
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding ManfNo}" UniqueName="ManfNo" ShowDistinctFilters="False" IsVisible="{Binding Source={StaticResource Locator},Path=SettingsService.IsMasterManfManfNo}" >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Orientation="Vertical" Margin="8">
                                        <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ManfNoFieldName}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
     
                                <!-- package count -->
                            <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="ColPackages" TextAlignment="Right"
                                DataMemberBinding="{Binding PackageCount}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PackageCountColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PackageCountColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
                            <!-- Quantity -->
                            <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False" x:Name="ColQtyOnHand"
                                DataMemberBinding="{Binding QtyOnHand}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.QtyOnHandColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.QtyOnHandColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
                            <!-- Quantity -->
                            <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                                DataMemberBinding="{Binding VItemManfXrefStockLevel.ScrapPerInsertQty}" DataFormatString="{}{0:n0}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ScrapPerInsertQtyColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ScrapPerInsertQtyColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
                            <!-- Quantity -->
                            <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False" DataFormatString="{}{0:P2}"
                                DataMemberBinding="{Binding VItemManfXrefStockLevel.ScrapPerKitPercent}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ScrapPerKitPercentColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ScrapPerKitPercentColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
                            <!-- Quantity -->
                            <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                                DataMemberBinding="{Binding VItemManfXrefStockLevel.MinLevel}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MinLevelColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MinLevelColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
                            <!-- Quantity -->
                            <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                                DataMemberBinding="{Binding VItemManfXrefStockLevel.MaxLevel}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MaxLevelColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MaxLevelColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
                             
                            <!-- Quantity -->
                            <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                                DataMemberBinding="{Binding VItemManfXrefStockLevel.MinPkgLevel}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MinPkgColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.MinPkgColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
                            <!-- Quantity -->
                            <telerik:GridViewDataColumn Width="Auto" TextAlignment="Right" ShowDistinctFilters="False"
                                DataMemberBinding="{Binding VItemManfXrefStockLevel.ReturnNotRequired}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ReturnNotRequiredColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ReturnNotRequiredColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
                            <!-- Quantity -->
                            <telerik:GridViewDataColumn Width="Auto" TextAlignment="Left" ShowDistinctFilters="True"  ShowFieldFilters="False"
                                DataMemberBinding="{Binding VItemManfXrefStockLevel.packName}"  >
                                <telerik:GridViewDataColumn.Header>
                                    <StackPanel Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PackageTypeColName1}" />
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.PackageTypeColName2}" />
                                    </StackPanel>
                                </telerik:GridViewDataColumn.Header>
                            </telerik:GridViewDataColumn>
     
     
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
    <DataTemplate x:Key="BrowseDetailTemplate">
                    <StackPanel d:DataContext="{d:DesignInstance Type=browse:ItemManfXrefStockLevel}">
                        <telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding AllStockViewModels}" SelectedItem="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.AllStockViewModel}" FilterOperatorsLoading="Detail_OnFilterOperatorsLoading"
                                             FrozenColumnsSplitterVisibility="Collapsed" IsFilteringAllowed="True" CanUserSortColumns="True" SelectionMode="Single"
                                             ShowColumnFooters="False"  FontSize="16" GridLinesVisibility="Both" ShowColumnHeaders="True" ShowGroupPanel="False"
                                             RowIndicatorVisibility="Collapsed" IsReadOnly="True" Margin="60,20" x:Name="DetailGrid" EnableRowVirtualization="True" EnableColumnVirtualization="True"
                                             >
                            <telerik:RadContextMenu.ContextMenu >
                                <telerik:RadContextMenu Opened="RadContextMenu_OnOpened">
                                        <telerik:RadMenuItem Header="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.ChangeQuantityMenuText}"
                                                             Command="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.ChangeOnHandQtyCommand}" />
                                </telerik:RadContextMenu>
                            </telerik:RadContextMenu.ContextMenu>
                             
                            <telerik:RadGridView.Columns>
     
                                <telerik:GridViewDataColumn IsFilterable="False" IsSortable="False" MinWidth="0" HeaderTextAlignment="Center" >
                                    <telerik:GridViewDataColumn.Header >
                                        <TextBlock Text="" Margin="0" Padding="0" />
                                    </telerik:GridViewDataColumn.Header>
                                    <telerik:GridViewDataColumn.CellTemplate>
                                        <DataTemplate >
                                            <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="Auto" >
                                                <CheckBox d:DataContext="{d:DesignInstance viewModel:AllStockViewModel}"
                                                          telerik:TouchManager.TouchMode="None"
                                                     IsEnabled="{Binding IsAvailable}"
                                                    IsChecked="{Binding IsSelected,Mode=TwoWay}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                                    >
     
                                                    <!--<CheckBox.LayoutTransform>
                                                        <ScaleTransform ScaleX="2" ScaleY="2" />
                                                    </CheckBox.LayoutTransform>-->
                                                </CheckBox>
                                            </Grid>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
     
                                    <!-- UID -->
                                <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="colUid" IsVisible="{Binding BrowsePackagePageViewmodel.ShowUID,Source={StaticResource Locator}}"
                                                            DataMemberBinding="{Binding UID}">
                                    <telerik:GridViewDataColumn.Header>
                                        <StackPanel Orientation="Vertical" Margin="8">
                                            <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.UIDDetailColName1}" />
                                        </StackPanel>
                                    </telerik:GridViewDataColumn.Header>
                                </telerik:GridViewDataColumn>
     
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding ParentNameLoc}" UniqueName="ParentNameLoc" ShowDistinctFilters="False" >
                                    <telerik:GridViewDataColumn.Header>
                                        <StackPanel Orientation="Vertical" Margin="8">
                                                <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.BinDetailColName}" />
                                        </StackPanel>
                                    </telerik:GridViewDataColumn.Header>
                                </telerik:GridViewDataColumn>
     
                                <telerik:GridViewDataColumn Width="200"
                                DataMemberBinding="{Binding QtyOnHand}" TextAlignment="Right" UniqueName="QtyOnHand" ShowDistinctFilters="False" >
     
                                    <telerik:GridViewDataColumn.Header>
                                        <StackPanel Orientation="Vertical" Margin="8">
                                                <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.QtyOnHandDetailColName1}" />
                                                <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.QtyOnHandDetailColName2}" />
                                        </StackPanel>
                                    </telerik:GridViewDataColumn.Header>
                                </telerik:GridViewDataColumn>
     
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding FifoDate}" DataFormatString="{}{0:d}" UniqueName="FifoDate" ShowDistinctFilters="False"  >
                                    <telerik:GridViewDataColumn.Header>
                                        <StackPanel>
                                                <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.FifoDateDetailColName1}" />
                                                <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.FifoDateDetailColName2}" />
                                        </StackPanel>
                                    </telerik:GridViewDataColumn.Header>
                                </telerik:GridViewDataColumn>
     
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding DateCode}"  >
                                    <telerik:GridViewDataColumn.Header>
                                        <StackPanel>
                                                <TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.DateCodeDetailColName1}" />
                                                <!--<TextBlock Text="{Binding Source={StaticResource AppResources},Path=BrowsePackagePageResources.DateCodeDetailColName2}" />-->
                                        </StackPanel>
                                    </telerik:GridViewDataColumn.Header>
                                </telerik:GridViewDataColumn>
     
                                <!-- Extra0 -->
                                <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="colExtra0" IsVisible="{Binding BrowsePackagePageViewmodel.ShowExtra0,Source={StaticResource Locator}}"
                                DataMemberBinding="{Binding VBinMasterAllStock.Extra0}">
                                    <telerik:GridViewDataColumn.Header>
                                        <StackPanel Orientation="Vertical" Margin="8">
                                            <TextBlock Text="{Binding BrowsePackagePageViewmodel.NameExtra0,Source={StaticResource Locator}}" />
                                        </StackPanel>
                                    </telerik:GridViewDataColumn.Header>
                                </telerik:GridViewDataColumn>
     
                                    <!-- Extra1 -->
                                    <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="colExtra1" IsVisible="{Binding BrowsePackagePageViewmodel.ShowExtra1,Source={StaticResource Locator}}"
                                DataMemberBinding="{Binding VBinMasterAllStock.Extra1}">
                                        <telerik:GridViewDataColumn.Header>
                                            <StackPanel Orientation="Vertical" Margin="8">
                                                <TextBlock Text="{Binding BrowsePackagePageViewmodel.NameExtra1,Source={StaticResource Locator}}" />
                                            </StackPanel>
                                        </telerik:GridViewDataColumn.Header>
                                    </telerik:GridViewDataColumn>
     
                                    <!-- Extra2 -->
                                    <telerik:GridViewDataColumn Width="Auto" ShowDistinctFilters="False" x:Name="colExtra2" IsVisible="{Binding BrowsePackagePageViewmodel.ShowExtra2,Source={StaticResource Locator}}"
                                DataMemberBinding="{Binding VBinMasterAllStock.Extra2}">
                                        <telerik:GridViewDataColumn.Header>
                                            <StackPanel Orientation="Vertical" Margin="8">
                                                <TextBlock Text="{Binding BrowsePackagePageViewmodel.NameExtra2,Source={StaticResource Locator}}" />
                                            </StackPanel>
                                        </telerik:GridViewDataColumn.Header>
                                    </telerik:GridViewDataColumn>
     
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding SortKey0}" IsVisible="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.IsRemoveDebugMode}" />
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding SortKey1}" IsVisible="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.IsRemoveDebugMode}" />
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding SortKey2}" IsVisible="{Binding Source={StaticResource Locator},Path=BrowsePackagePageViewmodel.IsRemoveDebugMode}" />
     
                                </telerik:RadGridView.Columns>
                        </telerik:RadGridView>
                    </StackPanel>
                </DataTemplate>
  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1073 posts

    Posted 02 Jul 2019 Link to this post

    Hi David,

    Thank you for the provided images and code snippet.

    Based solely on them, however, I cannot pinpoint an exact cause for this behavior. I've prepared a small sample project where I've tried to mimic your setup but scrolling the control horizontally works as expected and the details are preserved.

    Could you please try replicating the issue you described in this sample project or send over a project of your own where the behavior can be observed? As our forum system does not allow for files other than images to be attached, you can either upload the project to a storage provider of your choice or open a new support ticket via your Telerik account where archives up to 40 MB can be attached.

    Thank you in advance for your cooperation on the matter. I will be looking forward to your reply.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top