SPList.Ordered - Propriété

Gets or sets a Boolean value that specifies whether the option to allow users to reorder items in the list is available on the Edit View page for the list.

Espace de noms :  Microsoft.SharePoint
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
Public Property Ordered As Boolean
    Get
    Set
'Utilisation
Dim instance As SPList
Dim value As Boolean

value = instance.Ordered

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

Valeur de propriété

Type : System.Boolean
true if the option is available on the Edit View page; otherwise, false.

Remarques

The Ordered property is true by default for links lists. Setting this property to true for a list of base type Survey, IssueTracking, DocumentLibrary, or DiscussionBoard throws a System.NotSupportedException exception.

Exemples

The following code example adds to the Edit View page of the specified list the option to allow users to reorder items.

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();

Voir aussi

Référence

SPList classe

SPList - Membres

Microsoft.SharePoint - Espace de noms