且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

DataGridView.Rows.Add()出错

更新时间:2023-12-06 17:15:22

异常意味着它所说的内容。您正在尝试将行添加到没有列的表。看看这里看一个例子你需要的东西。
The exception means exactly what it says. You are attempting to add rows to a table that has no columns. Have a look here to see an example what you will need.


在你添加行之前通过调试进行检查,如果列存在于datagridview中。
check by debugging before you add the row that if the columns exists in datagridview.