my one of the column in a page is
<asp:BoundColumn DataField="NotificationList" SortExpression="NotificationList" HeaderText="NotificationList">asp:BoundColumn>
if user is admin i want to make this column visible else it should not be visible
in code behind,I have handled for SAVE button in Page_load
if (this.UserIsAdmin())
{
this.btnSave.Visible = true;
}
else
{
this.btnSave.Visible = false;
}
but i dont know how to do it for column "NotificationList".
Enable the bound column property to visible if user is admin
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

kiran kumarRank #3,110 · 461 reputationPosted Feb 18, 2010, 6:21 AM EST
this.gridview1.Columns[int index].Visible = false;
//in the above line index refers to your notification list column number
CHECK THE ANSWER IF IT HELPS YOU(PUT A MARK IN THE CHECKBOX)