This event occurs before data loading and allows to customize sorting of dataset
$gridConn->event->attach("beforeSort",handlerFunc);
handlerFunc gets the following arguments:
Sample of usage:
function custom_sort($sorted_by){ // SORT BY LENGTH(some_field) $sorted_by->rules[0]["name"]="LENGTH(some_field)"; } $conn->attach->event("beforeSort","custom_sort");