コード例 #1
0
        protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string  SelectStatusName = (DropDownList2.SelectedValue);
                DataSet ds = bll.GetDetailsByStatus(SelectStatusName);

                GridView1.DataSource = ds.Tables[0];
                GridView1.DataBind();

                if (DropDownList2.SelectedIndex == 1 || DropDownList2.SelectedIndex == 2)
                {
                    GridView1.Columns[7].Visible = false;
                }
                else
                {
                    GridView1.Columns[7].Visible = true;
                }
            }
        }