Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SPQuery.ViewFieldsOnly property

Gets or sets a value that indicates whether to retrieve only the fields specified in the ViewFields property.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public bool ViewFieldsOnly { get; set; }

Property value

Type: System.Boolean
true to return only the fields specified as ViewFields; otherwise, false.

When you specify fields by setting the ViewFields property, the query retrieves data for more than just those fields. To optimize performance, you can limit the data that is returned by the query by setting the ViewFieldsOnly property to true.

© 2015 Microsoft