1. 问题:DataGridView单元格编辑后,只有离开焦点时,编辑的内容才会生效(在绑定的DataSource中生效)。

  使用 this.dataGridView1.CommitEdit(DataGridViewDataErrorContexts.Commit);  

2. 问题:绑定空List<T>,报错“其他信息:索引-1没有值”

    DataGridView编辑实时生效和索引-1没有值问题

    this.dataGridView1.DataSource = new List<T> { new T() };

  

相关文章:

  • 2022-01-09
  • 2021-12-06
  • 2021-04-11
  • 2022-12-23
  • 2021-05-28
猜你喜欢
  • 2021-11-21
  • 2022-02-21
  • 2021-11-05
  • 2022-12-23
  • 2022-01-13
  • 2021-11-29
  • 2021-11-17
相关资源
相似解决方案