Term.CustomSortOrder Property
Gets or sets the custom sort order of the current Term object.
Namespace: Microsoft.SharePoint.Taxonomy
Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
Syntax
'Declaration
Public Overrides Property CustomSortOrder As String
Get
Set
'Usage
Dim instance As Term
Dim value As String
value = instance.CustomSortOrder
instance.CustomSortOrder = value
public override string CustomSortOrder { get; set; }
Property Value
Type: System.String
The value is a string composed of the child Term Guids separated by ':'. When the custom sort order is null or empty, the child Term objects of the current Term are sorted alphabetically based on data in the working language of the current TermStore object.
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user has insufficient permissions to perform this operation. |
TermStoreOperationException | This operation is invalid in the orphaned terms TermSet object.The operation failed. |
Remarks
If the custom sort order value contains an invalid Guid, or if one of the Guids does not belong to its child Term objects, then it is ignored. If any child Term Guid is not included, then it will be sorted alphabetically following the Term objects with custom sort order.
The current user must have TaxonomyRights.EditTerm permission in order to set this property. Call the CommitAll() method to save this change to the database.