WPF DataGridTemplateColumn combobox updating all rows

元气小坏坏 提交于 2019-12-05 19:23:34

Aplogises for the duplicates but after a few hours of guessing because there isnt enough material on the web for this kinda stuff, the solution is

                </DataGridTemplateColumn.CellTemplate>
                <DataGridTemplateColumn.CellEditingTemplate>
                    <DataTemplate>
                        <ComboBox ItemsSource="{Binding Source={StaticResource DeploymentTypeEnum}}"
                                  SelectedItem="{Binding DeploymentType}"
                                  **IsSynchronizedWithCurrentItem="false**">
                        </ComboBox>
                    </DataTemplate>
                </DataGridTemplateColumn.CellEditingTemplate>

IsSynchronizedWithCurrentItem - does what it says on the tin. However, when you select an item, the current one will disappear but at least it wont update all rows.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!