怎样删除Datagrid中的一行?
问题虽然菜,但是麻烦大虾把过程详细写出来```
Private Sub datagrid1_itemdatabound(ByVal sender As System.Object, ByVal e As System.web.ui.webcontrols.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound
If (e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem) Then
Dim btndelete As LinkButton = e.Item.Cells(9).Controls(0)
btndelete.Attributes.Add("onclick", "return confirm('确定要删除这条记录吗?')")
End If
End Sub