sorts the Grid by the specified column
col | number | the index of the column, by which the grid needs to be sorted |
type | string | the sorting type ("str"|"int"|"date"), optional, by default the sorting type is taken from the column's setting |
order | string | the sorting order ("asc"|"des"), optional, by default the sorting order is based on the previous sorting operation |
//sort the first column in the grid
myGrid.sortRows(0);
//sort the first column in the grid by the "str" type in the "des" order
myGrid.sortRows(0,"str","des");
Back to top