Check documentation for the latest version of dhtmlxSuite beforeSort DHTMLX Docs

beforeSort

This event occurs before data loading and allows to customize sorting of dataset

class CustomBehavior extends ConnectorBehavior{
    @Override 
    public void beforeSort(ArrayList<SortingRule> sorters) {
        //any custom code
    } 
}
component.event.attach(new CustomBehavior());

handlerFunc gets the following arguments:

  • sorters - set of sorting rules

Sample of usage:

class CustomBehavior extends ConnectorBehavior{
    @Override 
    public void beforeSort(ArrayList<SortingRule> sorters) {
        sorters.get[0].name = "LENGTH(some_field)";
    } 
}
component.event.attach(CustomBehavior);
Back to top