【发布时间】:2019-01-22 12:58:14
【问题描述】:
我希望我的代码循环遍历我的 datagridview 中的所有行,并将每行中的第一列值设置为自身的行索引号。到目前为止,我的代码不起作用。任何帮助表示赞赏。
if (e.RowIndex >= 0)
{
this.DataGridView.Rows(e.RowIndex).Cells(0).Value = e.RowIndex + 1;
}
【问题讨论】:
标签: c# datagridview