我有两个问题:
1.CellValueChanged事件和CurrentCellChanged事件这两个事件有什么区别? 我想在修改某个单元格的时候触发事件,该选哪个?
2.为什么这两个事件在窗口打开的时候就触发了? private void dataGridViewxIP_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
MessageBox.Show("hh");
}
对话框在窗口打开的时候就弹出来了,是什么原因??
1.CellValueChanged事件和CurrentCellChanged事件这两个事件有什么区别? 我想在修改某个单元格的时候触发事件,该选哪个?
2.为什么这两个事件在窗口打开的时候就触发了? private void dataGridViewxIP_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
MessageBox.Show("hh");
}
对话框在窗口打开的时候就弹出来了,是什么原因??
CurrentCellChanged,CurrentCell 属性更改时发生看帮助
this.dataGridView1.CellBeginEdit //编辑启动时发生
那第二个问题呢,为什么这两个事件在窗口打开的时候就触发了?
也将触发 CurrentCellChanged 事件
对于复选框单元格,希望立即处理更改。要在单击单元格时提交更改,必须处理 DataGridView.CurrentCellDirtyStateChanged 事件
CurrentCellChanged事件 ,是在选择的单元格改变的时候触发事件的
绑定前执行一次,绑定后执行一次