Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何遍历 datagridview 控件(Windows 窗体)并确定哪些行已被编辑、删除或是新的?
foreach (DataGridViewRow dgvr in dgv_OtherEarnings.Rows) { }
不管是什么样的循环,但你必须知道的是..
DataGridView.NewRowIndex将获取新记录的行索引
DataGridView.IsCurrentRowDirty将指示当前行是否有未提交的更改