The DocActionEvent Object

 <  Day Day Up  >  

The DocActionEvent Object

The DocActionEvent object is used during the handling of the OnClick event of the InfoPath button form control. The eventObj that is the argument to the OnClick event has an XDocument property that can be used to access or manipulate any part of the form's interface or data.

To learn more about the OnClick event, see "The OnClick Event," p. 343 (Chapter 19).


DocActionEvent Object Methods

The DocActionEvent object has no methods.

DocActionEvent Object Properties

The properties of the DocActionEvent object are available only during the OnClick event. The DocActionEvent object has three properties:

  • ReturnStatus ” Default Boolean value is true. Security level 2.

  • Source ” A reference to the innermost DOM node of the data source. Security level 2.

  • XDocument ” A reference to the current XDocument object, so it therefore allows any of its properties, methods, or descendant objects to be accessed. Security level 2.

The DocActionEvent.xsn form template demonstrates how these properties can be used in response to the firing of the OnClick event. Figure 18.2 uses the XDocument.UI.Alert() method to display eventObj.Source.xml , which displays the XML in the data source that surrounds the field corresponding to the button form control, and eventObj.XDocument.View. Name to display the name of the current view.

Figure 18.2. Using eventObj.Source.xml to display a secondary data source.

graphics/18fig02.gif

 <  Day Day Up  >  


Microsoft Office InfoPath 2003 Kick Start
Microsoft Office InfoPath 2003 Kick Start
ISBN: 067232623X
EAN: 2147483647
Year: 2004
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net