zoukankan      html  css  js  c++  java
  • grid 数据绑定后

    protected void gvList_ItemDataBound(object sender, DataGridItemEventArgs e)
            {
                if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
                {
                    if (((System.Web.UI.WebControls.Label)(e.Item.Cells[e.Item.Cells.Count - 2].Controls[1])).Text != "单据编号")
                    {
                        LinkButton button = (LinkButton)e.Item.Cells[e.Item.Cells.Count - 1].Controls[0];
                        e.Item.Cells[e.Item.Cells.Count - 1].Controls.Remove(button);

                    }
                    else
                    {
                        LinkButton button = (LinkButton)e.Item.Cells[e.Item.Cells.Count - 1].Controls[0];
                        button.Attributes.Add("onclick", "return confirm ('确认删除?');");
                    }

                }
            }

  • 相关阅读:
    程序设计网站综合
    .net 获取url的方法(转)
    制作简单的语音识别系统(阅读文章)
    创建 WPF 不规则窗口
    高斯消元法
    How many ways(DFS记忆化搜索)
    I NEED A OFFER!
    免费馅饼
    N^N(Leftmost Digit )
    Common Subsequence
  • 原文地址:https://www.cnblogs.com/ok519/p/1515326.html
Copyright © 2011-2022 走看看