DHTMLX Docs & Samples Explorer

onBeforeSorting Event

Required library edition: This method requires Professional Edition of the DHTMLX library

This event occurs before starting data sorting. onBeforeSorting event passes the following parameters:

  • column index
  • sorting type (“str”,”int”,”date”)
  • direction of sorting (“asc”,”des”)

Event is blockable (if custom code, attached to event, returns value different from true - sorting operation will be blocked)

        grid.attachEvent("onBeforeSorting", function(ind,type,direction){
              //any custom logic here
              return false;
        });