从datagridview中通过复选框删除记录 [英] delete records by checkbox from datagridview
本文介绍了从datagridview中通过复选框删除记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在检查gridview中的复选框后删除记录?
how can i delete records after check the checkbox from gridview?
推荐答案
将一个事件处理程序..添加到复选框..按照文章..
http://weblogs.asp.net/jgalloway/archive/2007/07/07/checkbox-grids-in-asp-net.aspx [ ^ ]
add a event handler.. to checkbox.. follow the article..
http://weblogs.asp.net/jgalloway/archive/2007/07/07/checkbox-grids-in-asp-net.aspx[^]
如何''回合:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For Each row As DataGridViewRow In DataGridView1.Rows
If row.Cells(0).Value = True Then
DataGridView1.Rows.Remove(row)
End If
Next
End Sub
hi,
删除多行记录Gridview CheckBox确认 [ ^ ]
这篇关于从datagridview中通过复选框删除记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文