int i = 0;
if (((CheckBox)e.Item.FindControl("CheckBox1")).Checked)
{
  i = 1;
}

解决方案 »

  1.   

    设置 checkboc.Value 值就行啦
      

  2.   

    只有使用代码来完成。在你的edit事件时就更新你的数据源的相应数据,updata的时候,提交数据到数据库。
    注意,你的checkbox实在edit事件发生时才实例化的,在此之前,其实为label。
      

  3.   

    写了,代码如下,怎么不行啊,最后面是出错信息
    int i;
    if (((CheckBox)e.Item.FindControl("Debit_Note_Grouping")).Checked) i = 1;

    else
    i = 0;
    m_Developer.m_Debit_Note_Grouping = i.ToString();
    ---------运行出错误信息----------
    Object reference not set to an instance of an object. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error: 
    Line 169: m_Developer.m_Fax_No = e.Item.Cells[7].Text;
    Line 170: int i;
    Line 171: if (((CheckBox)e.Item.FindControl("Debit_Note_Grouping")).Checked)
    Line 172:
    Line 173: i = 1;
     
      

  4.   

    yohomonkey(ht) :
    你说得具体意思是什么,不是很明白,请给我具体说说,谢谢了。
      

  5.   

    如果在当前行中找不到Debit_Note_Grouping,就会出现这样的错误。
    你在什么事件中写的?