Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IDataValueSortable

    Provides a sortable string representation of property values for database sorting.

    Namespace: Umbraco.Cms.Core.PropertyEditors
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IDataValueSortable
    Remarks

    Implement this interface on IDataValueEditor implementations when the stored value format does not naturally sort correctly (e.g., JSON-serialized dates).

    The returned sortable value is stored in the database and used for sorting in collection views. Values should be formatted to sort correctly when compared lexicographically (string comparison).

    Methods

    View Source

    GetSortableValue(object?, object?)

    Gets a sortable string representation of the property value.

    Declaration
    string? GetSortableValue(object? value, object? dataTypeConfiguration)
    Parameters
    Type Name Description
    object value

    The stored property value.

    object dataTypeConfiguration

    The data type configuration.

    Returns
    Type Description
    string

    A string that sorts correctly when compared lexicographically, or null to use default sorting. The returned value should be no longer than 512 characters.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX