2014年1月2日 星期四

GridView FindControl

GridView FindControl

c#
  1. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  2.  
  3.         {
  4.  
  5.             if (e.Row.RowType == DataControlRowType.DataRow)
  6.  
  7.                 {
  8.  
  9.                     Button btnGV = e.Row.FindControl("btnGVCancelOrder") as Button;
  10.  
  11.                     CheckBox ckb = e.Row.Cells[16].Controls[0] as CheckBox;
  12.  
  13.                     CheckBox ckb2 = e.Row.Cells[17].Controls[0] as CheckBox;
  14.  
  15.                     HiddenField hif = e.Row.FindControl("hifGVedt") as HiddenField;
  16.  
  17.                 }
  18.  
  19.          }

沒有留言:

張貼留言