How do I get the value of a gridview Cell?

后端 未结 4 1410
遥遥无期
遥遥无期 2021-01-14 20:14

How can I get the value of a gridview cell? I have been trying the code below with no luck.

protected void grvExpirations_RowDataBound(object         


        
4条回答
  •  北恋
    北恋 (楼主)
    2021-01-14 20:51

     protected void grvExpirations_RowDataBound(object sender, GridViewRowEventArgs e)
       {
          if (e.Row.RowType == DataControlRowType.DataRow)
         {
           int test = Convert.toInt32(e.Row.Cells[5].Text);
    
         }
       }
    

提交回复
热议问题