📜  datagridview cellvaluechanged 获取值 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:38.099000             🧑  作者: Mango

代码示例1
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
    newvalue = (int)dataGridView1[e.ColumnIndex, e.RowIndex].Value;
}

private void dataGridView1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
    oldvalue = (int)dataGridView1[e.ColumnIndex, e.RowIndex].Value;
}