2014年1月2日 星期四

GridView FindControl

GridView FindControl

c#
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    Button btnGV = e.Row.FindControl("btnGVCancelOrder") as Button;
                    CheckBox ckb = e.Row.Cells[16].Controls[0] as CheckBox;
                    CheckBox ckb2 = e.Row.Cells[17].Controls[0] as CheckBox;
                    HiddenField hif = e.Row.FindControl("hifGVedt") as HiddenField;
                }
         }

沒有留言:

張貼留言