DHTMLX Docs & Samples Explorer

sort (key, direction)

Sorts a dataset.

data.sort("#Version#","asc");
data.sort(function(a,b){
	return a.Version > b.Version ? 1 : -1;
},"asc");

Parameters:

  • key - the name of a property by which DataStore will be sorted or a custom sorting method
  • direction - the sorting direction
    • “asc”
    • “desc”