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

DataGrid Sizing Issue/Scroll Jump when using template column when virtualized

1 Answer 91 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Cody
Top achievements
Rank 1
Cody asked on 02 Nov 2017, 07:22 PM

Example: https://1drv.ms/i/s!AhsCP4S1tRotnluM4HdQKNpIiUQN

As you can see when I first go to Inline edit mode on a row there is no issue. However if I scroll down far enough to where one of the higher items in the list becomes virtualized and then try to go into inline edit mode you can see the results. I can verify this is virtualization because if I set the grids  

RealizedItemsVerticalBufferScale="500"  

Well beyond the number of items I am currently displaying there is no issue.  

<telerikGrid:RadDataGrid x:Name="DataGrid"
                                     DataContext="{x:Bind ViewModel}"
                                     ItemsSource="{x:Bind ViewModel.Entities}"
                                     SelectedItem="{x:Bind ViewModel.SelectedEntity, Mode=TwoWay}"
                                     AutoGenerateColumns="False"
                                     RealizedItemsVerticalBufferScale="500"
                                     ColumnResizeHandleDisplayMode="None"
                                     UserEditMode="Inline"
                                     GroupPanelPosition="Left"
                                     GridLinesVisibility="None"
                                     BorderThickness="0"
                                     ColumnDataOperationsMode="Flyout"
                                     RelativePanel.AlignLeftWithPanel="True"
                                     RelativePanel.AlignRightWithPanel="True"
                                     RelativePanel.Below="errorPane">
                <telerikGrid:RadDataGrid.Columns>
                    <telerikGrid:DataGridTemplateColumn Header="Asset" CanUserEdit="False">
                        <telerikGrid:DataGridTemplateColumn.CellContentTemplate>
                            <DataTemplate x:DataType="communityassets:CommunityAssetViewModel">
                                <Button Height="100" Width="100" Background="Transparent" Margin="5"
                                        Visibility="{x:Bind image, Converter={StaticResource NullToVisConverter}}">
                                    <controls:ImageEx Height="100" Width="100"
                                           Source="{x:Bind image, Mode=OneTime}"
                                           Stretch="Uniform"/>
                                    <Button.Flyout>
                                        <Flyout>
                                            <controls:ImageEx MaxHeight="425" MaxWidth="425"
                                                   Source="{x:Bind image, Mode=OneTime}"
                                                   Stretch="Uniform"/>
                                        </Flyout>
                                    </Button.Flyout>
                                </Button>
                            </DataTemplate>
                        </telerikGrid:DataGridTemplateColumn.CellContentTemplate>
                    </telerikGrid:DataGridTemplateColumn>
                    <telerikGrid:DataGridNumericalColumn PropertyName="FileAssetId" Header="File Asset Id" CanUserEdit="False"/>
                    <telerikGrid:DataGridComboBoxColumn PropertyName="Community"
                                                        ItemsSourcePath="CommunityList"
                                                        DisplayMemberPath="CommunityName"
                                                        SelectedValuePath="CommunityName"/>
                    <telerikGrid:DataGridComboBoxColumn PropertyName="Category"
                                                        ItemsSourcePath="CategoryList"
                                                        DisplayMemberPath="Category"
                                                        SelectedValuePath="Category"/>
                    <telerikGrid:DataGridTextColumn PropertyName="FileName" Header="File Name" CanUserEdit="True"/>
                </telerikGrid:RadDataGrid.Columns>
            </telerikGrid:RadDataGrid>

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 07 Nov 2017, 09:42 AM
Hi Cody,

Using the provided information we were able to reproduce the described by you issue. We have logged it in our Feedback portal. On the following link you can track the status of the item:
https://feedback.telerik.com/Project/167/Feedback/Details/231163-datagrid-using-templatecolumn-with-virtualization-results-in-unexpected-scrollin

As another workaround that you could use and is different than the one you have found with the RealizedItemsVerticalBufferScale is to set the RowHeight property of the DataGrid to the height of your highest column.

We apologize for the inconvenience the issue might be causing you. We have updated your Telerik points for the involvement.

If you have any additional questions or concerns regarding Telerik controls, please do not hesitate to contact us.

Regards,
Nasko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DataGrid
Asked by
Cody
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or