SPListItem.SortType property
取得或設定此項目類型的檢視中排序時。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Property SortType As SPFileSystemObjectType
Get
Set
'用途
Dim instance As SPListItem
Dim value As SPFileSystemObjectType
value = instance.SortType
instance.SortType = value
public SPFileSystemObjectType SortType { get; set; }
Property value
Type: Microsoft.SharePoint.SPFileSystemObjectType
指出此類型的列舉值。
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | 項目是現有的項目。此屬性可以設定只有在將新項目。 |
ArgumentException | 指定的值是SPFileSystemObjectType.Folder。不支援的排序類型。 |
備註
可以僅在新的項目上設定的排序類型。支援的預設排序類型只會變更套用至資料夾清單項目,會使排序一樣檔案的資料夾變更SPFileSystemObjectType.File 。