点击翻页后 页面会刷新  这样你钩选的Checked==false了,我想你完成的这种翻页时 每页都有被钩选的效果,是通过用Session把每页被钩选的记住?还是在绑定方法中已经写好的?

解决方案 »

  1.   

    wojiushi594() ( ) 信誉:100  2007-08-24 09:03:47  得分: 0  
    就是每一页都有选中的数据便于同时修改或删除操作嘛
    ------------------------------------------------------------------
    我觉得这样并不便于用户 删除修改  这样可能还会产生用户的误操作,而且还给你代码量增加
    ,真不如让用户自己钩选
    个人意见
      

  2.   

    循环遍历啊
    找到选中的id,就OK了
      

  3.   

    我平时不用Repeater控件  都用datagrid gridview 和datalist 但方法都一样 凑合给你写了一个
    foreach (RepeaterItem ri in Repeater1.Items)
            {
                CheckBox chk = (CheckBox)ri.FindControl("CheckBox1");
                if (chk.Checked)
                { 
                 ...
                }
            }
      

  4.   

    用GridView
    可以这样
            //foreach (GridViewRow in gv_Information.Rows)
            //{
            //    CheckBox ch = (CheckBox)gr.Cells[0].FindControl("CheckAll");
            //    if (ch.Checked == true)
            //    {
            //        //int adjustementid = Convert.ToInt32(gr.Cells[0].Text);
            //        //bllajust.Delete(adjustementid);
            //    }
            //}那Repeater了?
      

  5.   

    protected void Rpt_DataItemDound(object sender,RepeaterItemArges e)
      {
         int index=e.Item.ItemIndex;
         if(Rpt.Item[index].FindControl("checkBox").Checked)
              {
                 .........
                }    
      }
      

  6.   

    可以看下这个
    http://topic.csdn.net/t/20060106/14/4501905.html
      

  7.   

    foreach( RepeaterItem item in repProduct.Items )
    {
    CheckBox chProTypeEx = ( CheckBox ) item.FindControl("chProTypeEx");
    if( chProTypeEx.Checked == true )
    {
              }
    }
      

  8.   

    foreach( RepeaterItem item in repProduct.Items )
    {
    CheckBox chProTypeEx = ( CheckBox ) item.FindControl("chProTypeEx");
    if( chProTypeEx.Checked == true )
    {
              }
    }未将对象的引用设置到对象的实例
      

  9.   

    <asp:CheckBox ID="cb_sjs" runat="server" Checked='<%#Eval("是否选中")=="是"?true:flase %>' />