WPF Datagrid Row Editing “ENDED” event

后端 未结 8 2251
轻奢々
轻奢々 2020-12-09 01:48

I know that WPF datagrid has \"RowEditEnding\" event , but I need to fire the event on after the Row has comitted to check if the newly added row is duplicated and merge the

相关标签:
8条回答
  • 2020-12-09 02:37

    I wonder why you are finding the way to raise the RowEditEnded event; if you Implement the RowEditEnding event of datagrid; whenever you edited a row and change the focus from that row, the row will be committed and RowEditEnding will be raised;

    so after the Row has committed RowEditEnding will be raised and work just as RowEditEnded;

    Did I understand something wrong from your text?

    0 讨论(0)
  • 2020-12-09 02:39

    Try setting the CommitEdit() function for your datagrid. I used it here:

    private void DataGrid_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
    {
        this.MyDataGrid.CommitEdit(DataGridEditingUnit.Row, false);
    }
    
    0 讨论(0)
提交回复
热议问题