共用方式為


SPList.Ordered property

取得或設定指定是否允許使用者重新排序清單中的項目] 選項清單的 [編輯檢視] 頁面上的可用Boolean值。

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

Syntax

'宣告
Public Property Ordered As Boolean
    Get
    Set
'用途
Dim instance As SPList
Dim value As Boolean

value = instance.Ordered

instance.Ordered = value
public bool Ordered { get; set; }

Property value

Type: System.Boolean
true如果選項是 [編輯檢視] 頁面中,提供否則,請false。

備註

Ordered屬性是true預設的連結清單。此屬性設為基底類型Survey清單true , IssueTracking、 DocumentLibrary或DiscussionBoard會擲回System.NotSupportedException例外狀況。

Examples

下列程式碼範例會新增至指定的清單選項可允許使用者錄製的項目中的 [編輯檢視] 頁面上。

Dim site As SPWeb = SPContext.Current.Web
Try
    Dim list As SPList = site.Lists("List_Name")
    list.Ordered = True
    list.Update()
Finally
    site.Dispose()
End Try
SPWeb oWebsite = SPContext.Current.Web;
SPList oList = oWebsite.Lists["List_Name"];
oList.Ordered = true;
oList.Update();

請參閱

參照

SPList class

SPList members

Microsoft.SharePoint namespace