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 ('确认删除?');");
                    }

                }
            }

  • 相关阅读:
    SpringMVC扩展
    反射机制
    python day9
    python day8
    python day7
    python day6
    python day4
    python day3
    python day2
    python day1
  • 原文地址:https://www.cnblogs.com/ok519/p/1515326.html
Copyright © 2011-2022 走看看