TermSet.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 TermSet
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 TermGuid objects that are seperated by a :. When the custom sort order is a null reference (Nothing in Visual Basic) or empty, the child Term objects of the current Term is sorted alphabetically based on the working language of the current TermStore object.

Exceptions

Exception Condition
InvalidOperationException

The current Term is invalid.

UnauthorizedAccessException

The current user has insufficient permissions to perform this operation.

TermStoreOperationException

This operation is invalid in the Orphaned terms [TermSet]. The operation failed.

Remarks

If the custom sort order value contains invalid Guid or one of the Guid does not belong to its child Term objects, then it is ignored. If any child TermGuid is not included, then they will be sorted alphabetically following the Term objects with custom sort order.

The current user must have TaxonomyRights.Edit permission to set this property. Call the CommitAll() method to save this change to the database.

See Also

Reference

TermSet Class

TermSet Members

Microsoft.SharePoint.Taxonomy Namespace