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;
                                }
                            }
                        }
                    }

    }

  • 相关阅读:
    关于Java中String类的hashCode方法
    重写equal()时为什么也得重写hashCode()之深度解读equal方法与hashCode方法渊源
    vue+eslint+prettier+vetur 使用vscode 前端工程化
    vue webpack 打包优化
    移动端兼容
    vue 跨域使用
    vue2.0性能优化
    前端 mock的使用
    vue 使用Lodash 的throttle(节流)与debounce(防抖
    webpack4 安装及使用
  • 原文地址:https://www.cnblogs.com/dashi/p/4034756.html
Copyright © 2011-2022 走看看