📜  如何访问gridview的asp按钮 - C#代码示例

📅  最后修改于: 2022-03-11 14:49:24.050000             🧑  作者: Mango

代码示例1
protected void gvPayemenDetailNew_RowDataBound(object sender, 
GridViewRowEventArgs e)
{
foreach (GridViewRow row in gvPayemenDetailNew.Rows)
{
    if (row.RowType == DataControlRowType.DataRow)
    {
        Button btn = row.FindControl("btnGenNew") as Button;
        if (PayStatus == "Approved")
        {
            btn.Enabled = true;
        }
    }
}            
}