zoukankan      html  css  js  c++  java
  • GridView RowDataBound

    if (e.Row.RowType == DataControlRowType.DataRow)
            {
                if (e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataControlRowState.Alternate)             //正常查询显示
                {
                    Label lblSite = (Label)e.Row.FindControl("lblSite");
                    if (!this.ListAuthSite.Contains(lblSite.Text.Trim()))
                    {
                        e.Row.Cells[0].Controls[0].Visible = false; //Edit
                    }
                }
                if ((e.Row.RowState & DataControlRowState.Edit) != 0)  //RowEditing 绑定
                {
                    DropDownList ddl = (DropDownList)e.Row.FindControl("ddlHSCode");
                    string site = this.gdvPartNo.DataKeys[e.Row.RowIndex]["site"].ToString();
                    PartNoManager ma = apc.GetManager<PartNoManager>();
                    DataTable dt = ma.GetHSCode(site);
                    ddl.Items.Clear();
                    UIUtility.BindDropDownList(ddl, dt, "hs_code", "hs_code", ddl.ToolTip);
                }


            }

  • 相关阅读:
    Windows下使用nmake编译C/C++的makefile
    poj 1228
    poj 1039
    poj 1410
    poj 3304
    poj 1113
    poj 2074
    uva 1423 LA 4255
    poj 1584
    poj 3277
  • 原文地址:https://www.cnblogs.com/andycai/p/1750712.html
Copyright © 2011-2022 走看看