sortingMethod(uniqueName: String, compareFunction: Function)
[starting from version: 2.6]
Sets custom sorting for hierarchy members. For more details about defining custom sorting, refer to the Sorting tutorial.
Parameter/Type | Description |
---|---|
uniqueName String | The unique name of the hierarchy to which the sorting is applied. |
compareFunction Function | Defines the sort order. The input parameters are the same as for compareFunction of Array.sort() method. |
The following example shows sorting with really simple compareFunction
which sorts elements in reverse alphabetical order:
flexmonster.sortingMethod("Category", function (a, b) { return a < b ? 1 : -1; });
Try the example on JSFiddle.