Wijmo UI for the Web
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
Javascript (Usage) 
var instance; // Type: wijmo.data.IShape;
var value; // Type: any
value = instance.sort;
Javascript (Specification) 
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");
});
Browser Compatibility
7
5
5

See Also

Reference

IShape Interface

 

 


© 2013 All Rights Reserved.

Send comments on this topic.