SPListItem.SortType property

Gets or sets the type of this item when sorting within a view.

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

'Declaration
Public Property SortType As SPFileSystemObjectType
	Get
	Set
'Usage
Dim instance As SPListItem
Dim value As SPFileSystemObjectType

value = instance.SortType

instance.SortType = value

Property value

Type: Microsoft.SharePoint.SPFileSystemObjectType
An enumeration value that indicates the type.

ExceptionCondition
InvalidOperationException

The item is an existing item. This property can be set only on a new item.

ArgumentException

The value specified was SPFileSystemObjectType.Folder. That sort type is not supported.

The sort type can be set only on a new item. The only change from the default sort type that is supported applies SPFileSystemObjectType.File to folder list items, a change that causes folders to sort as if they were files.

Show: