when the user selects an option from a dropdownlist ie ACTIVE . i want that column 11 of gridview should be visible=false
this code is Not working when there are no records in a gridview.
this code is Not working when there are no records in a gridview.
if (ddlstatus.SelectedValue == "ACTIVE") //dropdownlist value change
{
lablestatus.Text = "ACTIVE USERS";
//e.Row.Cells[10].Visible = false;
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton lnk = (LinkButton)(e.Row.FindControl("lbaccept"));
lnk.Text = "Block";
lnk.CommandName = "Blocked";
}
}
Thanks


Lakshmanan Sethu SankaranarayanRank #124 · 17.7K reputationPosted Mar 28, 2014, 9:32 AM EDT