Search
Grid.sortByColumn Method
See Also
 






Sorts by the specified column and sort direction.

Namespace: MindFusion.DataViews
File: Grid.js

 Syntax

JavaScript  Copy Code

function sortByColumn (index, [sortAscending])

 Parameters

index

Number. The index of the column to sort by, or null to clear the sorting.

sortAscending
Optional.

Boolean. True to sort ascending, otherwise false.

 Example

The following code sorts the first column in the grid in ascending order:

JavaScript  Copy Code
grid.sortByColumn(0, true);

 See Also