如题,是怎么回事

解决方案 »

  1.   

     protected void GGridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
            {
                string i =GGridView.Rows[e.RowIndex].Cells[0].Text.ToString();
                Response.Write(i);
           }这样写i的内容是空的 是怎么回事
      

  2.   

    string val = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[1].Controls[0])).Text.ToString().Trim(); 试试看
      

  3.   

    ((TextBox)GridView.Rows[e.RowIndex].FindControl("控件ID")).Text
      

  4.   


    楼主是在控件里面取值,还是在想在页面取值,通过控件绑定的数据不能从页面取值的
    如果是控件取值:((控件类型)GGridView.Rows[e.RowIndex].FindControl("控件ID")).Text
    ;
    如果是页面取值:GGridView.Rows[e.RowIndex].Cells[0].Text.ToString();
      

  5.   

    每次都会有这样的问题,sharepoint项目里用SPGridview时就会取不到值,
    string str=spgridView.Rows[0].Cells[0].Text;
    str是空值。为什么