Disabling Event Handlers

M

Matt Stead

During the development of a largish InfoPath form i have needed to make use
of several event handlers for populating dynamic tables. I am only
interested in the "Insert" eventObj.Operation calls.

During one of these events if i have a large number of rows in a dynamic
table that require updating i am getting the following error:

An error occured in the form's code. The number of calls to the
OnAfterChange event for a single update in the data exceeded the maximumm
limit.

This is being caused because a procedure that does the data updates on each
row calls a node.replaceChild(new, old) call which then causes an
OnAfterChange event to be raised for that data item, and so on.

Is there a way to disable the event handlers until after the bulk update has
completed?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top