File: xdobjView.htm

package info (click to toggle)
office2003-schemas 1.0%2Bds-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, sid, trixie
  • size: 42,304 kB
  • sloc: javascript: 2,429; makefile: 29
file content (11 lines) | stat: -rw-r--r-- 3,995 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
<html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01021249"><META NAME="lcid" CONTENT="1033"><title>View Object</title><link rel="stylesheet" type="text/css" href="office10.css"><script type="text/javascript" language="Javascript" src="ExpCollapse.js"></script><script type="text/javascript" language="JavaScript" src="inline.js"></script></head><body><h1>View Object</h1><div class="ofvbanav"><span class="ofvbanavreuse" id="seealso" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="properties" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="methods" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="events" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="specifics" onclick="toggleList()" onkeypress="toggleList()"></span></div><table class="ofvbaomart"><tr><td class="noborder" nowrap="true"><A HREF="xdobjView.htm" title="View"><SPAN class="omblue">View</SPAN></A><br /></td></tr></table><p>Represents a view within a Microsoft Office InfoPath 2003 form. The <b class="bterm">View</b> object provides a number of properties and methods that can be used to programmatically interact with an InfoPath view, including methods for selecting data contained in the view, switching from one view to another, synchronizing the view with a form's underlying XML document, and executing an InfoPath editing action.</p><h2>Remarks</h2><p>InfoPath forms can contain one or more views, and one view is always defined as the default view. When you work with a view using the <b class="bterm">View</b> object, you are accessing the currently active view.</p><p><b>Note</b>  The InfoPath object model also provides the <b class="bterm"><a href="xdcolViewInfos.htm" id="HV01021188" lcid=" ">ViewInfos</a></b> collection, which can be used to get information about all of the views implemented in a form.</p><h2>Using the View object</h2><p>The <b class="bterm">View</b> object is accessed through the <b class="bterm"><a href="xdproView.htm" id="HV01021352" lcid=" ">View</a></b> property of the <b class="bterm"><a href="xdobjXDocument.htm" id="HV01021254" lcid=" ">XDocument</a></b> object. For example, the following code sets a reference to a form's currently active view:</p><pre><code>var objView;

objView = XDocument.<b class="bterm">View</b>;</code></pre><p>To change the currently active view, you can use the <b class="bterm"><a href="xdmthSwitchView.htm" id="HV01021422" lcid=" ">SwitchView</a></b> method of the <b class="bterm">View</b> object as follows:</p><pre><code>XDocument.<b class="bterm">View</b>.SwitchView("View2");</code></pre><p>To force an update of a view based on changes in a form's underlying XML document, you can use the <b class="bterm"><a href="xdmthForceUpdate.htm" id="HV01025231" lcid=" ">ForceUpdate</a></b> method of the <b class="bterm">View</b> object, as shown here:</p><pre><code>XDocument.<b class="bterm">View</b>.ForceUpdate();</code></pre><p>For more information about using the <b class="bterm">View</b> object, see <a href="inconWorkingWithViews.htm" id="HV01039908" lcid=" ">Working with views</a>.</p><script type="text/javascript" language="JScript" src="ofvbanl.js"></script><span id="ofVBAISpan" class="ofvbaispan"><iframe id="ofVBAIFrame" frameborder="0" marginheight="0" marginwidth="4" scrolling="auto" width="100%" src="../links/xdobjView_l.htm"></iframe></span><center><a href="XMLSchemaCopyright_HV01147162.htm">&copy;2003-2004 Microsoft Corporation. All rights reserved.</a>  

Permission to copy, display and distribute this document is available at: <a 

href="http://r.office.microsoft.com/r/rlidAWSContentRedir?AssetID=XT010988631033&amp;CTT=11&amp;Origin=HV011232471033" 

target="_new">http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp</a></center></body></html>