WPF DataGrid CellEditEnding - DataSet Not Updating Till Row Lost Focus

后端 未结 5 946
粉色の甜心
粉色の甜心 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:30

    Simply jump to any other control of your dialog by calling [control].Focus(). Do this inside the OnClosing() event.

    The LostFocus is the default update trigger for the data cell. But the window itself and also the border or title of the window (and there the system button "X") cannot get a focus. That's why the editing is not end.

提交回复
热议问题