protected void gvreport_RowCreated(object sender, GridViewRowEventArgs e) { if (username=="Admin")// Your Condition for hiding the column { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[4].Visible = false; } if (e.Row.RowType == DataControlRowType.Header) { e.Row.Cells[4].Visible = false; } } }
No comments:
Post a Comment