Check documentation for the latest version 6.0 of dhtmlxSuite beforeSort DHTMLX Docs

beforeSort

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

$conn->event->attach("beforeSort",handlerFunc);

Parameters handlerFunc:

Availability:

  • Available for Grid, Treegrid

Sample:

function custom_sort($sorted_by){
   $sorted_by->rules[0]["name"]="LENGTH(some_field)";// SORT BY LENGTH(some_field)
}
$conn->attach->event("beforeSort","custom_sort");
Back to top