zoukankan      html  css  js  c++  java
  • 操作GridView嵌套的Repeater控件

    protected void gridView_DataBound(object sender, EventArgs e)             

    {   

     int index = gv.EditIndex;

                    Repeater rpt = (Repeater)gv.Rows[index].Cells[2].FindControl("rpt");
                    RepeaterItemCollection cc = rpt.Items;

                    for (i = 0; i < cc.Count; i++)
                    {
                        for (int j = 0; j < cc[i].Controls.Count;j++)
                        {
                            HyperLink list = cc[i].Controls[j] as HyperLink;
                            if (list != null)
                            {
                                list.Visible = false;
                            }
                            else
                            {
                                TextBox lb = cc[i].Controls[j] as TextBox;
                                if (lb != null)
                                {
                                    lb.Visible = true;
                                }
                            }
                        }
                    }

    }

  • 相关阅读:
    自动化设计自动化测试介绍
    自动化设计框架介绍 TestReport
    自动化设计自动化测试环境搭建<二>
    自动化设计自动化测试环境搭建<三>
    浅谈敏捷模型
    自动化设计框架介绍 TestLog
    自动化设计框架介绍 TestScript
    自动化设计框架介绍
    LoadRunner脚本录制常见问题整理<转>
    自动化设计框架介绍 TestSnap
  • 原文地址:https://www.cnblogs.com/dashi/p/4034756.html
Copyright © 2011-2022 走看看