你试试用GridView的索引的FindControl方法.

解决方案 »

  1.   

    具体代码在公司里,我明晚再详细说.
    先指定到你要编辑的那行,取它的索引.
    你的CheckBox是GridView1的一个编辑列吧.
    在"GridView1_editCommand(object sender, System.EventArgs e)"里
    你就能用e.Item.FindControl()来取值了.
    这些代码是我手写的,可能有误.
      

  2.   

    刚看到另一个帖里的(http://topic.csdn.net/u/20071025/16/d86c4dee-10e5-44b5-ab54-0a7d160e7056.html)
    如果是DataGrid的话: 
    string id=""; 
    for (int i=0;i <DataGrid1.Item.Count;i++) 

        CheckBox chk = (CheckBox)DataGrid1.Items[i].FindControl("chk"); 
        if (chk.Checked) 
        { 
            id = DataGrid1.Items[i].Cells[1].Text; 
            Response.Write("Delete:" + id.ToString(); 
        } 
    }我自己写的有点记不清了,明天去公司看了源代码再来回复.
      

  3.   

    CheckBox CheckRow = (CheckBox)row.FindControl("CheckBox1"); 
    这里用了findcontrolstring sqlstr = "update  tb_client  set  Crm_pid =( '" + TextBox4.Text + " ') where  '" + CheckRow.Checked.Equals(true) + " '"; 
    这里为什么不用findcontrol呢?
    都是在gridview里边的吧?另外还有一个问题,你这个sql写出来是什么??
    update  tb_client  set  Crm_pid ’aaa’ where  'true'