SMART datagrid v.1 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.sortOrder  property

The sorting order of this column. 

It starts from 0. If it is not sorted column, it will return -1. You can check sorting direction by sortDirection property. 

Defaults to -1.

Getter
function sortOrder(): Integer
Code -1
    $('#sort').click(function () {
        var col = grid.focusedColumn();
        if (col.sortOrder() < 0) {
            grid.orderBy([col]);
        }
    });
See Also
sortDirection
sortable
orderBy
GridBase.operateOptions
OperateOptions.sortingEnabled
Examples
Column Sorting