TreeList.SortChanged

Syntax

SortChanged: function (sender, args);

Parameters

sender. Event source.

args. Event information. Available arguments: Column - column index with modified sorting; Method - sorting method, element of the PP.SortDirection enumeration; Property - property name used for sorting (only for the first column); Recursive - attribute of child elements sorting: true (by default) - sorting was applied to all branches of child elements, false - branches of child elements have its own sorting methods.

Description

The SortChanged event occurs after finishing of editing of hierarchical tree column sorting.

Comments

Column sorting is available if the TreeList.EnableSortColumns property is set to true.

In order to sort the column, press column heading requiring sorting.

Example

To execute the example, the page must contain the TreeList component named treeListSett (seebsp; Example of Creating the TreeList Component). Add event handlers that processe tree sorting changing:

// Add event handlers that process tree sorting changing 
treeListSett.SortChanged.add(function (sender, args) {
    console.log("Sorting changed");
});
treeListSett.SortChanging.add(function (sender, args) {
    console.log("Sorting is changing");
});

Change sorting of elements by pressing column header. As a result, the console displays a message about sorting changing:

Sorting is changing

Sorting is changed

See also:

TreeList