private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem) || (e.Item.ItemType == ListItemType.SelectedItem) )
{
e.Item.Attributes.Add ("ondblclick", "javascript:return confirm('确定删除" + e.Item.Cells[1].Text + "?');");
}
}
转载于:https://www.cnblogs.com/jinglelin/archive/2004/07/31/28996.html