InfoPathEventHandler

L

Li

Hi

When I load infopath, I copy data to infopath and it invokes infopathevent.

Can I set some attribute let it not invoke infopathevent?

Thanks
 
L

Li

OnAfterChange, because it takes much time when loading.

Thanks

"Greg Collins [MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in message
Which event are you trying to prevent?

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



Hi

When I load infopath, I copy data to infopath and it invokes infopathevent.

Can I set some attribute let it not invoke infopathevent?

Thanks
 
L

Li

I already prevent these events running during the OnLoad, but still very
slow.
When I deleted all these events it much faster. I used C# not javascript.
Is it code which make infopath so slow?

Thank you for your help.


"Greg Collins [MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in message
During the OnLoad event, the View object is null. You can check for this to
prevent any other event from running during the OnLoad event.

The following example will prevent the OnAfterChange event for my:field1
from being processed during the OnLoad event (notice the addition of the
check for (null == XDocument.View):

function XDocument::OnLoad(eventObj)
{
XDocument.DOM.selectSingleNode("//my:field1").text = "Some Value";
}

function msoxd_my_field1::OnAfterChange(eventObj)
{
if(eventObj.IsUndoRedo || null == XDocument.View)
return;

XDocument.UI.Alert("OnAfterChange Event Processed");
}


Hope this helps!

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



OnAfterChange, because it takes much time when loading.

Thanks

"Greg Collins [MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in message
Which event are you trying to prevent?

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



Hi

When I load infopath, I copy data to infopath and it invokes infopathevent.

Can I set some attribute let it not invoke infopathevent?

Thanks
 

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