从datagridview删除未检查的行 [英] deleting unchecked rows from 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.
这篇关于从datagridview删除未检查的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文