<kendo:dataSource-sortItem>

The sort order which will be applied over the data items. By default, the data items are not sorted.

Example

<kendo:dataSource-sort>
    <kendo:dataSource-sortItem></kendo:dataSource-sortItem>
</kendo:dataSource-sort>

Configuration Attributes

compare java.lang.String

Function which can be used for custom comparing of the DataSource items.

Example

<kendo:dataSource-sortItem compare="compare">
</kendo:dataSource-sortItem>

dir java.lang.String

The sort order (direction).The supported values are: "asc" (ascending order) or "desc" (descending order).

Example

<kendo:dataSource-sortItem dir="dir">
</kendo:dataSource-sortItem>

field java.lang.String

The field by which the data items are sorted.

Example

<kendo:dataSource-sortItem field="field">
</kendo:dataSource-sortItem>

Event Attributes

compare String

Function which can be used for custom comparing of the DataSource items.

Example

<kendo:dataSource-sortItem compare="handle_compare">
</kendo:dataSource-sortItem>
<script>
    function handle_compare(e) {
        // Code to handle the compare event.
    }
</script>

Event Tags

kendo:dataSource-sortItem-compare

Function which can be used for custom comparing of the DataSource items.

Example

<kendo:dataSource-sortItem>
    <kendo:dataSource-sortItem-compare>
        <script>
            function(e) {
                // Code to handle the compare event.
            }
        </script>
    </kendo:dataSource-sortItem-compare>
</kendo:dataSource-sortItem>
In this article
Not finding the help you need?