Hi
In our daily coding, so many time we have to do particular action in some particular cell. For example we have to do enable/disable some row cell of Gridview on some condition. Then we can do like this
Step1: Click on onrowdatabound event of Grid
Step2: Write the code in code behind like this
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{Button btn1 = (Button)e.Row.FindControl(“BtnSubmit”);
if (e.Row.RowType == DataControlRowType.DataRow)
{Label LblEmpSal = (Label)e.Row.FindControl(“lblEmpSal”);
if (LblEmpSal.Text == “15000”)
{
btn1.Enabled = false;
}}
}