DataGrid双击事件

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 + "?');");
    }
   }
posted @ 2004-05-18 12:36  MHL  阅读(1706)  评论(0编辑  收藏  举报