Enabling and disabling edit and delete