Sorts by the specified column and sort direction.
Namespace: MindFusion.DataViews
File: Grid.js
JavaScript Copy Code |
---|
function sortByColumn (index, [sortAscending]) |
Number. The index of the column to sort by, or null to clear the sorting.
Boolean. True to sort ascending, otherwise false.
The following code sorts the first column in the grid in ascending order:
JavaScript Copy Code |
---|
grid.sortByColumn(0, true); |