View3.GetSelectedNodes Method

Gets a reference to an XMLNodesCollection collection that is populated with XML Document Object Model (DOM) nodes based on the current selection of items in a view.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
Function GetSelectedNodes As XMLNodesCollection
'Usage
Dim instance As View3
Dim returnValue As XMLNodesCollection

returnValue = instance.GetSelectedNodes()
XMLNodesCollection GetSelectedNodes()

Return Value

Type: Microsoft.Office.Interop.InfoPath.SemiTrust.XMLNodesCollection
A reference to the XMLNodesCollection.

Implements

View2.GetSelectedNodes()
View.GetSelectedNodes()

Remarks

If no items are selected in a view, or if only text is selected, then the GetSelectedNodes method returns an empty collection.

Note

The GetSelectedNodes method will not return nodes based on the current selection if used in the OnClick event of a button in the view, since the focus is lost from the control that is intended to be in context. To avoid this behavior, use the GetSelectedNodes method from a custom task pane, menu or toolbar.

Important

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

See Also

Reference

View3 Interface

View3 Members

GetSelectedNodes Overload

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace