Table of Contents

Interface IView

Namespace
PnP.Core.Model.SharePoint
Assembly
PnP.Core.dll

Public interface to define a View object

public interface IView : IDataModel<IView>, IDataModelParent, IDataModelWithContext, ISupportModules<IView>, IDataModelGet<IView>, IDataModelLoad<IView>, IDataModelUpdate, IDataModelDelete, IQueryableDataModel
Inherited Members
Extension Methods

Properties

Aggregations

Specifies the aggregations displayed by the list view. The Aggregations property contains a CAML string.

string Aggregations { get; set; }

Property Value

string

AggregationsStatus

Specifies whether the aggregations are shown in the list view

string AggregationsStatus { get; set; }

Property Value

string

All

A special property used to add an asterisk to a $select statement

object All { get; }

Property Value

object

AssociatedContentTypeId

Gets or sets Associated Content Type Id

string AssociatedContentTypeId { get; set; }

Property Value

string

BaseViewId

Specifies the base view identifier of the list view

string BaseViewId { get; }

Property Value

string

CalendarViewStyles

Gets or sets Calendar View Styles

string CalendarViewStyles { get; set; }

Property Value

string

ColumnWidth

Gets or sets Column Width

string ColumnWidth { get; set; }

Property Value

string

CustomFormatter

Gets or sets Custom Formatter

string CustomFormatter { get; set; }

Property Value

string

DefaultView

Gets or sets a Boolean value that specifies whether the view is the default view

bool DefaultView { get; set; }

Property Value

bool

DefaultViewForContentType

Gets or sets a Boolean value that specifies whether the view is the default view for the associated content type

bool DefaultViewForContentType { get; set; }

Property Value

bool

EditorModified

Gets a Boolean value that indicates whether the view was modified in an HTML editor

bool EditorModified { get; set; }

Property Value

bool

Formats

Specifies the definitions for column and row formatting that are used in a datasheet view

string Formats { get; set; }

Property Value

string

GridLayout

An attribute of the view, specifies the quick edit layout

string GridLayout { get; set; }

Property Value

string

Hidden

Gets or sets Hidden

bool Hidden { get; set; }

Property Value

bool

HtmlSchemaXml

Gets the Html Schema Xml

string HtmlSchemaXml { get; }

Property Value

string

Id

Gets the Id

Guid Id { get; }

Property Value

Guid

ImageUrl

Specifies the server relative or absolute URL of the Image for the List View

string ImageUrl { get; }

Property Value

string

IncludeRootFolder

Specifies if the Root Folder is included in the List View

bool IncludeRootFolder { get; set; }

Property Value

bool

An attribute of the view, specifies the Javascript files used for the view.

string JSLink { get; set; }

Property Value

string

ListViewXml

Gets or sets List View Xml

string ListViewXml { get; set; }

Property Value

string

Method

Specifies the view method for the list view

string Method { get; set; }

Property Value

string

MobileDefaultView

Specifies whether the list view is the default for a mobile device

bool MobileDefaultView { get; set; }

Property Value

bool

MobileView

Specifies whether the list view applies to a mobile device

bool MobileView { get; set; }

Property Value

bool

ModerationType

Specifies the content approval type for the list view. A string that indicates the Content Approval type, which can be one of the following values: HideUnapproved -- Unapproved draft items are hidden from users who only have permission to read items. Contributor -- Pending and rejected items for the current user are displayed. Moderator -- Pending and rejected items for all users are displayed to users who have managed list permissions.

string ModerationType { get; }

Property Value

string

NewDocumentTemplates

An attribute of the view, indicates what documents/templates are visible in "New" menu of a document library

string NewDocumentTemplates { get; set; }

Property Value

string

OrderedView

Specifies whether users can reorder items through the user interface

bool OrderedView { get; }

Property Value

bool

PageRenderType

Gets the reason why the page is rendered in classic UX, or Modern if the page is in Modern UX

ListPageRenderType PageRenderType { get; }

Property Value

ListPageRenderType

Paged

Specifies whether the list view supports displaying items across multiple pages

bool Paged { get; set; }

Property Value

bool

PersonalView

Specifies whether the view is a personal view or a public view

bool PersonalView { get; }

Property Value

bool

ReadOnlyView

Specifies if the view is read-only

bool ReadOnlyView { get; }

Property Value

bool

RequiresClientIntegration

Specifies whether this view requires client integration

bool RequiresClientIntegration { get; }

Property Value

bool

RowLimit

Specifies the limit for the number of items that the list view will return per page

int RowLimit { get; set; }

Property Value

int

Scope

Specifies the recursive scope for the list view of a document library

ViewScope Scope { get; set; }

Property Value

ViewScope

ServerRelativeUrl

Specifies the server relative URL of the list view page

string ServerRelativeUrl { get; }

Property Value

string

StyleId

Specifies the identifier of the view style for the list view

string StyleId { get; }

Property Value

string

TabularView

Gets or sets the TabularView attribute in the View Schema XML

bool TabularView { get; set; }

Property Value

bool

Threaded

Gets a Boolean value that indicates whether the view is threaded

bool Threaded { get; }

Property Value

bool

Title

Specifies the Display Name of the List View

string Title { get; set; }

Property Value

string

Toolbar

Specifies the toolbar (CAML) for the list view

string Toolbar { get; set; }

Property Value

string

ToolbarTemplateName

Specifies the name of the toolbar template that is used for the list view toolbar

string ToolbarTemplateName { get; }

Property Value

string

ViewData

Specifies the view data for the list view

string ViewData { get; set; }

Property Value

string

ViewFields

Gets or sets View Fields

IViewFieldCollection ViewFields { get; }

Property Value

IViewFieldCollection

ViewJoins

Specifies the list joins that will be used by the list view

string ViewJoins { get; set; }

Property Value

string

ViewProjectedFields

Specifies the projected fields that will be used by the list view

string ViewProjectedFields { get; set; }

Property Value

string

ViewQuery

Specifies the CAML query that will be used by the list view

string ViewQuery { get; set; }

Property Value

string

ViewType

Specifies the type of the view

ViewType ViewType { get; }

Property Value

ViewType

ViewType2

Gets or sets the ViewType2

ViewType2 ViewType2 { get; set; }

Property Value

ViewType2

Methods

AddViewField(string)

Adds a field to the current view

void AddViewField(string internalFieldName)

Parameters

internalFieldName string

Internal name of the field to add

AddViewFieldAsync(string)

Adds a field to the current view

Task AddViewFieldAsync(string internalFieldName)

Parameters

internalFieldName string

Internal name of the field to add

Returns

Task

MoveViewFieldTo(string, int)

Moves a view field to a new position in the view

void MoveViewFieldTo(string internalFieldName, int newOrder)

Parameters

internalFieldName string

Internal name of the view field to move

newOrder int

New position

MoveViewFieldToAsync(string, int)

Moves a view field to a new position in the view

Task MoveViewFieldToAsync(string internalFieldName, int newOrder)

Parameters

internalFieldName string

Internal name of the view field to move

newOrder int

New position

Returns

Task

RemoveViewField(string)

Removes a field from the current view

void RemoveViewField(string internalFieldName)

Parameters

internalFieldName string

Internal name of the field to remove

RemoveViewFieldAsync(string)

Removes a field from the current view

Task RemoveViewFieldAsync(string internalFieldName)

Parameters

internalFieldName string

Internal name of the field to remove

Returns

Task

SetViewXml(string)

Sets the XML schema for the current view. Use this method instead of updating ListViewXml when you want to persist view settings that are only part of the view schema, e.g. column widths (ColumnWidth)

void SetViewXml(string viewXml)

Parameters

viewXml string

XML schema to apply to the view, e.g. the (modified) value of ListViewXml

SetViewXmlAsync(string)

Sets the XML schema for the current view. Use this method instead of updating ListViewXml when you want to persist view settings that are only part of the view schema, e.g. column widths (ColumnWidth)

Task SetViewXmlAsync(string viewXml)

Parameters

viewXml string

XML schema to apply to the view, e.g. the (modified) value of ListViewXml

Returns

Task