What event catches a change of value in a combobox in a DataGridViewCell?

后端 未结 4 1173
醉话见心
醉话见心 2020-12-01 09:09

I want to handle the event when a value is changed in a ComboBox in a DataGridView cell.

There\'s the CellValueChanged event,

4条回答
  •  攒了一身酷
    2020-12-01 09:42

    You can also handle the CurrentCellDirtyStateChanged event which gets called whenever a value is changed, even if it's not commited. To get the selected value in the list, you would do something like:

    var newValue = dataGridView.CurrentCell.EditedFormattedValue;
    

提交回复
热议问题