从datagridview删除未检查的行

从datagridview删除未检查的行

问题描述:

大家好,

在datagridview中,我添加了带有复选框的列.有没有办法通过checkbox.checked = false从datagridview中删除行?

谢谢.

Hi all,

in a datagridview I added a column with checkboxes. Is there any way to delete the rows from the datagridview with the checkbox.checked=false?

Thanks.

是的.它将与checkbox.checked = true相同.仅检查条件被更改.

循环浏览各行,查找是否选中了该行中的复选框,然后根据结果将其删除.
Yes. It would be the same way as it is for checkbox.checked=true. Only the check condition is getting changed.

Loop through the rows, find if checkbox in that row is checked or not, delete it as per result.