Where are all the event handlers? I have an infopath 2007 template
with code behind written in C#. When I try to find the event handlers
- I only get a very limited set - Validate, Changed textboxs or on the
form. I see alot of items on the web where others use OnSave or
OnAfterChange, but the code is written in javascript. How do I gain
access to these other events in C#?
Thanks for your time.
Zhang Haiguang - 14 Mar 2007 17:07 GMT
Here is a demo:
// NOTE: The following procedure is required by Microsoft Office InfoPath.
// It can be modified using Microsoft Office InfoPath.
public void InternalStartup()
{
EventManager.FormEvents.ViewSwitched += new
ViewSwitchedEventHandler(FormEvents_ViewSwitched);
((ButtonEvent)EventManager.ControlEvents["CTRL5_5"]).Clicked += new
ClickedEventHandler(CTRL5_5_Clicked);
EventManager.FormEvents.Loading += new
LoadingEventHandler(FormEvents_Loading);
((ButtonEvent)EventManager.ControlEvents["CTRL6_5"]).Clicked += new
ClickedEventHandler(CTRL6_5_Clicked);
}
Please add your event handlers to EventManager.FormEvents or
EventManager.ControlEvents.
InfoJet Service
InfoPath Web Form
[http://www.infojetsoft.com]