DHTMLX Docs & Samples Explorer

Index
dhtmlxdataview
API Methods

## sort (key, direction)

Required library edition:

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");