--后台 protected void bt_tuifang_Click(object sender, EventArg" />
您好,欢迎来到[编程问答]网站首页   源码下载   电子书籍   软件下载   专题
当前位置:首页 >> 编程问答 >> .NET >> repeater控件 Repeater删除报There is no row at position 9 的错误

repeater控件 Repeater删除报There is no row at position 9 的错误

来源:网络整理     时间:2016/7/5 9:26:15     关键词:repeater控件

关于网友提出的“repeater控件 Repeater删除报There is no row at position 9 的错误”问题疑问,本网通过在网上对“repeater控件 Repeater删除报There is no row at position 9 的错误”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题:repeater控件 Repeater删除报There is no row at position 9 的错误
描述:

--页面
   ' >' >
--后台
protected void bt_tuifang_Click(object sender, EventArgs e)
        {
            this.bt_tuifang.Enabled = false;
            for (int i = 0; i < Repeater1.Items.Count; i++)
            {
                CheckBox cb = (CheckBox)Repeater1.Items[i].FindControl("CheckBox1");
                if (cb.Checked)
                {
                    (new NeiBin_BLL()).Update_TuiFang2(cb.ToolTip.ToString());
                }
            }
            Repeater1.Dispose();
            bind();
            this.bt_tuifang.Enabled = true;
        }
用这个删除时有时候正常,有事就会报There is no row at position 9 这一类的的错误,这是怎么回事??


解决方案1:

bind的详细代码贴一下

解决方案2:

Repeater1.Dispose();去掉 
贴bind()代码。
删除之后从新绑定一下
There is no row at position 9 
第9行没有数据了 你在删除要出错。。


以上介绍了“repeater控件 Repeater删除报There is no row at position 9 的错误”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/2291896.html

repeater控件相关图片

repeater控件相关文章