|
发表于 2020-1-3 20:24:01
|
显示全部楼层
private void dgrdAttachment_ItemDataBound(object sender, DataGridItemEventArgs e)
{
//删除前单出一个对话框 ,让用户进行确认
if(e.Item.ItemType==ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem
||e.Item.ItemType==ListItemType.SelectedItem )
{
ImageButton imgbtn1= (ImageButton)e.Item.FindControl("imgbtn_Delete") as ImageButton;
imgbtn1.Attributes.Add ("onclick","return confirm(''que ren shan chu?');");
}
} |
|