Originariamente inviato da rafpas
scusate l'intro
xche non provate a fare quest sull'evento ItemCreated del datarid
Private Sub MyGrid_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles MyGrid.ItemCreated
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem, ListItemType.EditItem
Dim myTableCell As TableCell
myTableCell = e.Item.Cells(0)
Dim myCancellaBot As LinkButton
myCancellaBot = myTableCell.Controls(0)
myCancellaBot.Attributes.Add("onclick", "return confirm('Sei sicuro di voler eliminare questo record?');")
End Select
End Sub
ciao