Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
  protected void Gridview1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            DataTable dt = new DataTable();
            dt = (DataTable)Gridview1.DataSource;
            int rowindex = e.Row.RowIndex;
            e.Row.Attributes.Add("class", "customerRow");
            
        }
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            if (e.Row.Cells[5].Text.Equals("Finished"))
            {
                e.Row.BackColor = System.Drawing.Color.DarkGreen;
                e.Row.ForeColor = System.Drawing.Color.White;
                e.Row.Visible = false;
            }

            
        }

    }

  

    protected void Button1_Click(object sender, EventArgs e)
    {
     
    }
}


What I have tried:

actually my code permit to hide row if condition are complet so i what to view all row hidden when i clicked to a button
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900