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)

public SPFileSystemObjectType SortType { get; set; }

Property value

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


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


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.