Open
Description
Describe the bug
When using DataGridTemplateColumn and binding certain columns to an observable collection, custom template columns won't retain their values such as comboboxes, datepickers, and sometimes Autosuggest boxes.
Also when scrolling the Datagrid with large amounts of data it sometimes duplicates previous inputs.
Regression
No response
Reproducible in sample app?
- This bug can be reproduced in the sample app.
Steps to reproduce
1. Create an observable collection
2. Bind to DataGrid
3. Add custom template columns
4. Add controls such as combobox, datepicker, etc to template
5. Try to add values to the control at runtime.
Expected behavior
Each row should maintain values set by the user until the Itemssource is updated.
Screenshots
Windows Build Number
- Windows 10 1809 (Build 17763)
- Windows 10 1903 (Build 18362)
- Windows 10 1909 (Build 18363)
- Windows 10 2004 (Build 19041)
- Windows 10 20H2 (Build 19042)
- Windows 10 21H1 (Build 19043)
- Windows 11 21H2 (Build 22000)
- Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
- Windows 10, version 1809 (Build 17763)
- Windows 10, version 1903 (Build 18362)
- Windows 10, version 1909 (Build 18363)
- Windows 10, version 2004 (Build 19041)
- Other (specify)
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
No response
Device form factor
Desktop
Nuget packages
No response
Additional context
<!--Displaying static options combobox-->
<controls:DataGridTemplateColumn x:Name="Combo" Header="ComboBox">
<controls:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox x:Name="StaticCombo" Width="150" SelectionChanged="Combo_SelectionChanged">
<ComboBoxItem Content="Do Something 1"/>
<ComboBoxItem Content="Do Something 2"/>
<ComboBoxItem Content="Do Something 3"/>
</ComboBox>
</DataTemplate>
</controls:DataGridTemplateColumn.CellTemplate>
</controls:DataGridTemplateColumn>
Help us help you
No.
Metadata
Metadata
Assignees
Type
Projects
Status
No status
Activity