点滴积累,融会贯通

-----喜欢一切有兴趣的东西

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  269 随笔 :: 0 文章 :: 418 评论 :: 17 引用
private void dg_DSC_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
  {
   DataTable dt=new DataTable();
   if(e.Item.ItemIndex!=-1)
   {
    int order=e.Item.ItemIndex+1;
    e.Item.Cells[0].Text=order.ToString();
    e.Item.Cells[9].Text="<a href=\"#\" onclick=\"OpenWin('CSD_New.aspx?number="+Server.UrlEncode(e.Item.Cells[1].Text)+"',600,350);\">修改</a>";
    e.Item.Cells[10].Text="<a href=\"#\" onclick=\"OpenWin('CSD_intercalate.aspx?number="+Server.UrlEncode(e.Item.Cells[1].Text)+"',720,600);\">商品信息</a>";
    e.Item.Cells[11].Text="<a href=\"#\" onclick=\"OpenWin('CSD_client.aspx?number="+Server.UrlEncode(e.Item.Cells[1].Text)+"',720,650);\">客户信息</a>";
    if(e.Item.Cells[6].Text=="已生效")
    {
     e.Item.Cells[12].Visible=false;
    }
    TableCell myTableCell;
    myTableCell=e.Item.Cells[12];
    LinkButton link=(LinkButton)myTableCell.Controls[0];
    link.Attributes.Add("onclick","return confirm('您真要删除此行吗?');");
   }
   foreach (DataGridItem Itemcolor in this.dg_DSC.Items)
   {
    Itemcolor.Attributes.Add("onmouseover","this.bgColor='Gainsboro'");
    Itemcolor.Attributes.Add("onmouseout","this.bgColor='white'");
   }
  }
posted on 2006-02-13 08:22 小寒 阅读(379) 评论(0)  编辑 收藏 网摘 所属分类: DataGrid&&GridView




标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
Google站内搜索

China-pub 计算机图书网上专卖店!6.5万品种 2-8折!
近千种 9-95 新二手计算图书火热销售中!
开发者征途系统新作:《设计模式——基于C#的工程化实现及扩展》

相关文章:

相关链接: