private void dgView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 8)
            {
                dgView.CommitEdit(DataGridViewDataErrorContexts.CurrentCellChange);
                var val = dgView["All", e.RowIndex].Value;
......

今天写到DataGridView里的CheckBox选中或取消时并不能立即获取值。查了下,加上红色标记的代码,立即提交变更。即可。

相关文章:

  • 2021-05-31
  • 2021-09-20
  • 2021-12-23
  • 2022-01-02
  • 2022-01-02
  • 2022-01-02
  • 2022-01-18
猜你喜欢
  • 2021-12-23
  • 2022-01-18
  • 2022-01-02
  • 2021-10-02
  • 2021-10-02
  • 2021-10-02
  • 2021-10-02
相关资源
相似解决方案