1.
Add a hyperlink button column to the DataGrid, set the text to "Delete", and add the following code to the aspx page
2. Add a hyperlink button column to the DataGrid, set the ID to "del", and bind the data.
for(int i=0;i< myCount;i++)
{
((ImageButton)dataGrid.Items[i].FindControl("del")).Attributes.Add("onclick","return confirm('This operation will be permanently deleted, are you sure to delete it?");')");
}
http://www.cnblogs.com/bccu/archive/2006/11/02/548296.html