ViewQuery property

View.ViewQuery property

Gets or sets a value that specifies the query that is used by the list view.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (in Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

public string ViewQuery { get; set; }

Property value

Type: System.String
Returns a String instance representing the query that is used by the list view.

It must be a null reference (Nothing in Visual Basic) or a valid XML fragment that conforms to CamlQueryRoot.

The CamlQueryRoot type is used to specify conditions and preferences for returning list items from a larger set of list items.


<xs:complexType name="CamlQueryRoot">
    <xs:all> <xs:element name="Where" type="LogicalJoinDefinition" minOccurs="0" maxOccurs="1" />
        <xs:element name="OrderBy" type="OrderByDefinition" minOccurs="0" maxOccurs="1" />
        <xs:element name="GroupBy" type="GroupByDefinition" minOccurs="0" maxOccurs="1" />
© 2015 Microsoft