JavaScript

canSort

Arguments

eobject

An object passed to the event that contains the following properties:

sortColumnnumber

The column number the user clicked to sort the Grid. Column numbers correspond to the visible columns in the Grid.

Description

Fires when the user tries to sort the Grid by clicking on a column title. If the event returns false, the action is cancelled.

To prevent the user from sorting the Grid, the event can return false. For example:

if (e.sortColumn == 2) {
    // cannot sort column 2
    return false;
}