DataGridView, how to determine when the user exits the edit control by clicking the Run button?

In the DataGridView, I have a CellValueChanged event, when the user changes the value of the cell, this event is fired. When the user changes one cell, the value 1 changes to 2, then the user clicks the next cell and presses Escape, the value in the first cell changes from 2 to 1, the CellValueChanged event does not fire. I store values ​​in temporary lists of an object, and I have update values ​​in these lists. What event is fired when the user presses the Exit key and exits the edit control mode?

thank

+5
source share
2 answers

Refer to the CellEndEdit event .

+3
source

There is also this place:

    // Implements the IDataGridViewEditingControl.GetEditingControlFormattedValue method.
    public object GetEditingControlFormattedValue(DataGridViewDataErrorContexts context)
    {            
        if (context.ToString() == "Parsing, Commit")
        {
            // Do something here
        }

        return EditingControlFormattedValue;
    }
0
source

All Articles