逐句跟踪执行一下,看看哪步又把他设回去了.或者你没重新绑定gridview

解决方案 »

  1.   

    我看了阿  没有对ck操作的语句  重新绑定gridview? 
      

  2.   

    我看不懂这里:gvPackage.Rows[iNumber[j]], 检查哪些行的CheckBox被选中应该是一行一行检查吧?如:
    foreach(GridViewRow row in gvPackage.Rows)
    {
        CheckBox cb = (CheckBox)row.FindControl("ckAutoRenew");
        AOrderPlanRow aOrderPlanRow = ((DataRowView)row.DataItem).Row as AOrderPlanRow;
        aOrderPlanRow.bCurrentMonthlyPlan = (cb != null & cb.Checked) ? true : false; 
        //...
    }
      

  3.   

    页面加载有没有
    if(!IsPostBack)
    {}
      

  4.   

    我这个是RadioBotton的.你参照下,重写个看看.  protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int index = ((GridViewRow)((Button)e.CommandSource).NamingContainer).RowIndex;
            RadioButton RadioButton1 = GridView1.Rows[index].FindControl("RadioButton1") as RadioButton;             if (RadioButton1.Checked)
                    {
                       Name = RadioButton1.Text;
                    }
               int id =int.Parse( GridView1.DataKeys[index].Value.ToString());           
        }