vb.net如何统计datagridview某一列有值的行数,代码怎么写?

2025-03-11 08:16:27
推荐回答(2个)
回答1:

int colIndex = 2;
int notNullRows = this.dataGridView1.Rows.OfType()
.Count(r => r.Cells[colIndex].Value != null);

回答2:

楼主会了么,能教一下么