Repeater中将某一列的值拷贝到其他列上  (1月 拷贝Button) (2月 CheckBox) (3月 CheckBox) (4月 CheckBox)  (粘贴 Button)
A       10   
B       20  
C       30               
点击拷贝Button之后拷贝1月份那列的值   点击 2月或3月,4月的CheckBox之后点粘贴 将1月份那列的值粘贴到你选择的那个月份下

解决方案 »

  1.   

    repeater控件不支持手动绑定
    只能通过更新数据源的方式再次绑定repeater
      

  2.   

    那Repeater控件支持控件里面套控件(TextBox)或(DropDownList)吗???
    还要在后台控制那个控件(TextBox)或(DropDownList)???
      

  3.   

    这也就是对datatable的一个操作,只是根据checkbox选择的情况,该操作那些列 
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        for (int j = 1; j < dt.Columns.Count; j++)
                        {
                            //标题栏上的checkbox的id命名要以 chk_ 加 列名
                            Control control = this.Page.FindControl("chk_" + dt.Columns[j].ColumnName);
                            if (control!=null&&(control as CheckBox).Checked)
                            {
                                dt.Rows[i][dt.Columns[j].ColumnName] = dt.Rows[i][0];
                            }
                        }
                    }
                    this.Repeater1.DataSource = dt;
                    this.Repeater1.DataBind();