'Datagrid is glitching and rows are getting Reordered when scrolling upwards
When I run this, it gets a fairly large list of items. At first scrolling downwards has no issues at all. However when I scroll upwards it starts glitching back and forth and you can never reach the top of the DataGrid. Even more the rows start to get mixed up and no longer sit in the position they're supposed to.
<DataGrid
Grid.Row="1"
CanUserResizeColumns="True"
CanUserReorderColumns="False"
CanUserSortColumns="False"
IsReadOnly="True"
HeadersVisibility="All"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AutoGenerateColumns="False"
GridLinesVisibility="All"
MaxColumnWidth="500"
HorizontalScrollBarVisibility="Visible"
VerticalScrollBarVisibility="Visible"
Background="{Binding Context.UniversalSettingsContext.BackgroundColor}"
Items="{Binding Context.WorkItemPanelContext.WorkItems}"
>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Allow?">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsThreeState="False" IsChecked="{Binding IsChecked}" HorizontalAlignment="Right"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding Id}" Header="Id" />
<DataGridTextColumn Binding="{Binding State}" Header="State" />
<DataGridTextColumn Binding="{Binding Description}" Header="Description" />
<DataGridTextColumn Binding="{Binding ReleaseNotes}" Header="Release Notes" />
</DataGrid.Columns>
</DataGrid>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
