DHTMLX Docs & Samples Explorer

sort (key, direction)

Required library edition: This method works with any edition of DHTMLX library

Required library file: dhtmlxdataview.js

adds any user-defined handler to available events

  • key - name of property, by which dataview will be sorted, or custom sorting method
  • direction - sorting direction can take “asc” or “desc” values
	view.sort("#Version#","asc");
	view.sort(function(a,b){
		return a.Version > b.Version ? 1 : -1;
	},"asc");