One day, I developed a form in which, I show the user post that he post on our website. This form used to approved these post. I want to fill the grid view with approved post when user selects approved post from list and waiting approval post when user select this. I show two button, one for approved and one for delete.
I want to hide the approved button when user select the approved. I use this code to do that
if (ListName.Text == “1”)
{
GridViewName.Columns[columnIndex].Visible = false;
}
else
{
GridViewName.Columns[columnIndex].Visible = true;
}