如何获取gridview当前行某列的数值!!!!!!

解决方案 »

  1.   

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            e.Row.Cells[0].Text;
        }或for (int i = 0; i < GridView1.Rows.Count; i++)
            {
                GridView1.Rows[i].Cells[0].Text;
            }
      

  2.   

    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "View")
            {
                        int rowIndex = Convert.ToInt32(e.CommandArgument);
           }
    }