工大后院

 找回密码
 加入后院

扫一扫,访问微社区

QQ登录

只需一步,快速开始

搜索
查看: 1591|回复: 1

麻烦详细解释一下c#代码

[复制链接]
发表于 2009-10-13 09:20 | 显示全部楼层 |阅读模式
悬赏50饭票未解决

  1.   private void DataGrid1_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
  2.   {
  3.    if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
  4.    {
  5.     LinkButton link = e.Item.Cells[e.Item.Cells.Count - 3].Controls[0] as LinkButton;     
  6.     link.Attributes.Add("onclick","return confirm('您确认要删除当前留言吗?');");
  7.    }
  8.   }
复制代码


感谢帮助

 楼主| 发表于 2009-10-13 09:24 | 显示全部楼层
另外麻烦说说ItemCommand和ItemCreated的区别,DataGrid的资料好少,都是GridView的资料,麻烦熟悉vs2003的同学指点一下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入后院

本版积分规则

QQ|Archiver|手机版|小黑屋|广告业务Q|工大后院 ( 粤ICP备10013660号 )

GMT+8, 2024-4-28 15:19

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表