S
Stafarian
I'll keep this simple. I have a datagrid with checkboxes coded in my
Itemtemplate control. How do I wire up a button control to the datagrid, so
that if I select one or more checkboxes it deletes that row? Here is the Sub
from that button
Protected Sub Delete_User(ByVal sender As Object, ByVal e As EventArgs)
Dim xbox1 As CheckBox = CType(sender, CheckBox)
Dim dgItem As DataGridItem = CType(xbox1.NamingContainer, DataGridItem)
if xbox1.checked then
redlabel.Text = "You selected row " & dgItem.Cells(1).Text
end if
End Sub
Itemtemplate control. How do I wire up a button control to the datagrid, so
that if I select one or more checkboxes it deletes that row? Here is the Sub
from that button
Protected Sub Delete_User(ByVal sender As Object, ByVal e As EventArgs)
Dim xbox1 As CheckBox = CType(sender, CheckBox)
Dim dgItem As DataGridItem = CType(xbox1.NamingContainer, DataGridItem)
if xbox1.checked then
redlabel.Text = "You selected row " & dgItem.Cells(1).Text
end if
End Sub