Wijmo UI for the Web
sort Field
wijmo.data Namespace > IShape Interface : sort Field

Default value: null

Indicates one or more field names on which to sort the data. By default, the data is sorted in ascending order. For more information about setting the sorting directions, ascending or descending, refer to ISortDescriptor.

Syntax
var instance; // Type: wijmo.data.IShape;
var value; // Type: any
value = instance.sort;
var sort : any;
Example
The Quick Start sample shows a similar implementation using Knockout. To use the property without using KnockOut, use the document ready function as in this example.
$(document).ready(function () {
            var productView = new wijmo.data.ArrayDataView(sourceData());

            $("#demo-grid").wijgrid({ 
                data: productView, 
            });
In the code example below, click the ID and Unit buttons to sort data in ascending order of the Product ID and Unit Price respectively.
$("#sortId").click(function () {
    productView.sort("Product_ID");
});
$("#sortPrice").click(function () {
    productView.sort("Unit_Price");
});
See Also

Reference

IShape Interface