how to access asp button of gridview

82

how to access asp button of gridview -

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;
        }
    }
}            
}

Comments

Submit
0 Comments