Microsoft Office Tutorials and References
In Depth Information
In InfoPath 2003, you needed to write your own .xsl transformation code to
perform a merge. In InfoPath 2007, merging forms can be done using a built-in
FormEvents_Merge(object sender, MergeEventArgs e)
Here is an example to show how the InfoPath forms can be merged:
public void FormEvents_Merge(object sender, MergeEventArgs e)
string strFromPath = @"C:\InfoPathForm\Form1.xml";
XmlDocument InfoPathXML = new XmlDocument();
// The InfoPath Form template must be Fully Trusted.
XPathNavigator xNavigate = InfoPathXML.CreateNavigator();
// Merge the root node to the current form.
A Merge event can be cancelled by using the CancelableArgs property of the
MergeEventArgs class and setting the Cancel property to true .
InfoPath 2007 is a powerful data-driven platform. XML events are otherwise called
data validation events in InfoPath. The changed event, changing event, and the
validating event are the events used for form validation purposes, as explained
in the following table:
Changed event will be fired after the changes to a form's
essential XML document have been accepted and the
Validating event has occurred; the Changed event is
bound using the XmlChangedEventHandler delegate.
Changing event will be fired after changes to a form's
essential XML document have been made, but before the
changes have been accepted; the Changing event is bound
using the XmlChangingEventHandler delegate
Validating event is fired after changes to a form's
essential XML document have been accepted, but before
the Changed event has occurred; the Validating event is
bound using the XmlValidatingEventHandler delegate