The View Object

 <  Day Day Up  >  

The View Object

The View object represents a view in an InfoPath form. The View object provides methods that allow switching of views, synchronizing the displayed view with the underlying XML DOM, selecting data in a view, or executing an InfoPath editing action.

View Object Methods

The View object has 10 methods:

  • DisableAutoUpdate() ” Disables the normal synchronization between the content of the XML DOM and the corresponding view. This can be useful for performance reasons when making multiple programmatic updates to the DOM. Security level 2.

  • EnableAutoUpdate() ” Restores the synchronization between the XML DOM and the corresponding view. Unless the DisableAutoUpdate() method has explicitly turned off synchronization, the EnableAutoUpdate() method does nothing. Security level 2.

  • ExecuteAction() ” Executes an InfoPath editing command based on a selection made in the view. Security level 2.

  • Export() ” Exports a view to a specified format. Currently, the only format supported is MHTML. The method's first argument is the location for the file to be created. The second argument is MHT . Security level 3.

  • ForceUpdate() ” Forces synchronization of a view with its underlying data. This can be useful if synchronization has been disabled using DisableAutoUpdate() , or to update a view in response to a change in a secondary data source used in the view. Security level 2.

  • GetContextNodes() ” Returns a reference to an XMLNodes collection. Security level 2.

  • GetSelectedNodes() ” Returns a reference to an XMLNodes collection defined by a selection made in the view. Security level 2.

  • SelectNodes() ” Selects a range of nodes specified by the arguments to the method. Security level 2.

  • SelectText() ” Selects text in an editable form control that is bound to a specified DOM node. Security level 2.

  • SwitchView() ” Switches to a named view, specified by the string argument. Security level 2.

View Object Properties

The View object has two properties:

  • Name ” Read-only. The name of a view in an InfoPath form. Security level 2.

  • Window ” Read-only. A reference to the window associated with a view.

 <  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