WPF DataGrid SelectedItem binding stops working after item change

后端 未结 1 2115
遇见更好的自我
遇见更好的自我 2021-02-10 04:16

My problem/situation is very similar to Wpf DataGrid SelectedItem loses binding after cell edit but I\'m not using any \"custom\" WPF framework. I have a model that implements <

1条回答
  •  难免孤独
    2021-02-10 04:31

    Apparently the SelectedItem dependency property on DataGrid is broken and not being used correctly. After some debugging using OnPropertyChanged, I found that the grid is actually setting a "CurrentItem" property reliably. I changed to use CurrentItem instead and everything appears to work correctly... the user's "selected row" is being sent to the VM without incident.

    0 讨论(0)
提交回复
热议问题