SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I disable event firing in code that is not part of an ItemReceiver?

E.g.: I have an FeatureActivated event receiver which update a list (adds column) and updates all items to populate the new column. I want to do this without firing the 'ItemUpdated'-event for all items in the list.

share|improve this question
What I don't understand is : Events firing may be disabled for which SharePoint objects/area/domain/scope : web ? Farm ? list ? Item ? Where is the association made ? Many thanks – user16325 Apr 12 '13 at 15:07
@user16325 See this Question:… – Dribbel Apr 13 '13 at 15:42
up vote 13 down vote accepted

You can use this approach - create class:

public class DisabledItemEventsScope : SPItemEventReceiver, IDisposable
    private readonly bool oldValue;

    public DisabledItemEventsScope()
        oldValue = EventFiringEnabled;
        EventFiringEnabled = false;

    #region IDisposable Members

    public void Dispose()
        EventFiringEnabled = oldValue;



using (var scope = new DisabledItemEventsScope())

from here

share|improve this answer
Nice and clean! – Dribbel Mar 15 '12 at 15:00
Should this work for updating any item properties without firing an event, or just in that specific situation? – thanby Jan 24 '13 at 14:16
This will work for any item update – Kai Jan 24 '13 at 14:48
What if I need to disable event firing on a list, i.e. when I don't have the context of the list in question. I have some SharePoint web part code that needs to update a property of an item in a list. And I want to disable event firing when updating the property of that item, since the list has a registered event receiver. – Web User Jan 6 at 4:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.