thanks all for your help,
here is the cod ei added
Sub MyDataGrid_ItemCreated(Sender As Object, e As DataGridItemEventArgs)
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem, ListItemType.EditItem
Dim myTableCell As TableCell
myTableCell = e.Item.Cells(0)
Dim myDeleteButton As Button
myDeleteButton = myTableCell.Controls(0)
myDeleteButton.Attributes.Add("OnClick","button=th is.value")
End Select
End Sub
then i added this to the datagrid:
OnItemCreated="MyDataGrid_ItemCreated"
|