WPF DataGrid CellEditEnding - DataSet Not Updating Till Row Lost Focus

后端 未结 5 931
粉色の甜心
粉色の甜心 2020-12-16 14:59

I need to be able to update values of a dataset once a cell loses focus from editing. I know when the cell loses focus (CellEditEnding), but problem is, the actual updating

5条回答
  •  不思量自难忘°
    2020-12-16 15:34

    You can use DataGrid.CommitEdit from your DataGrid.CellEditEnding handler, being sure to handle reentrancy.

    Here's a blog article that describes the technique:

    • Commiting bound cell changes immediately in WPF Datagrid

提交回复
热议问题