Q:

Removing gridview edit column from .Master Page

I am working on an enterprise project. So, there are many users from data entry operators to the higher management. User accounts are separately stored in UserData Table and their respective privileges in the userprivileges table.
Multiple forms in my gridview support transaction for which I have provided View, edit, update options as below.
<asp:GridView ID="grvId".....>
   <Columns>
     <asp:BoundField..... />
     .
     .
      <asp:TemplateField AccessibleHeaderText="Edit" HeaderText="Edit">
          <ItemTemplate>
              <asp:Button ID="btnEdit" runat="server" CausesValidation="false" 
                  CommandName="Edit" Text="Edit" />
          </ItemTemplate>
          <EditItemTemplate>
              <asp:Button ID="btnUpdate" runat="server" CausesValidation="true" 
                  CommandName="Update" Text="Update" />
              <asp:Button ID="btnCancel" runat="server" CausesValidation="false" 
                  CommandName="Cancel" Text="Cancel" />
          </EditItemTemplate>
      </asp:TemplateField>
      <asp:ButtonField ButtonType="Button" CommandName="Delete" HeaderText="Delete" Text="Delete" />
   </Columns>
</asp:GridView>

What I want to do is that, based on session (user currently logged in), I have to set the visibility of the EDIT and DELETE functionality in the gridview. 
UPDATE: Can this be implemented in the .Master page and a call from the subsidiary pages be possible?

A:

In the C# Code-Behind, check the current user and check there Privileges.
Once you have determined this you can then simply hide the column : 
if (!userEdit) {
    grvId.Columns[0].Visible = false;
}

Where the 0 is the column number of the Edit Column (Remember collections start at 0) and the userEdit variable is a boolean set on whether the user can Edit the grid or not.

