Need a special offer?Find out if your project fits.
+
All documentation
API reference
  • API Reference for older versions
  • getFlatSort

    getFlatSort(): Array

    [starting from version: 2.8.2]

    Returns an array of FlatSortObjects defining the sorting on the flat grid.

    If the flat sorting isn’t specified, or all the sorted hierarchies have the "undefined" sorting type, an empty array is returned.

    Note that the getFlatSort method is available only for reports based on "csv", "json", and "api" data source types.

    Example

    flexmonster.getFlatSort();
     
    /* method returns array of objects
    [
      {uniqueName: "Category", sort: "desc"},
      {uniqueName: "Price", sort: "asc"}
    ]
    */

    Try the example on JSFiddle.

    See also

    setFlatSort
    getSort
    setSort
    sortingMethod