add

Wednesday, March 4, 2009

How to stop ItemUpdate fire from ItemListener

Many tile it happens that we update an item and call custom Item added event listener.

Now suppose , if we have to update some item of list in the event listner so the update event will get fire again from the listener and it will be a never endin g loop..

In order to solve that, there is a one line solution...

In the ItemUpdated event,

put the following code:

this.DisableEventFire();

then update the list and again enable the same

this.EnableventFire();

This will solve the issue.

No comments: