Get Current Sort Column/Order - why doesn't fnSettings.aaSorting[0][0] work anymore?

Get Current Sort Column/Order - why doesn't fnSettings.aaSorting[0][0] work anymore?

Eugene_BEugene_B Posts: 19Questions: 8Answers: 0

Why doesnt the following work anymore?

        'sortedCol' : table.settings().aaSorting[0][0], 
        'sortedDir' : table.settings().aaSorting[0][1]

I'm getting 'aaSettngs' not recognized, and also 'settings' not recognized.

Answers

  • Eugene_BEugene_B Posts: 19Questions: 8Answers: 0

    Also, the following doesn't work:

            'sortedCol' : table.order().order[0][0], 
            'sortedDir' : table.order().order[0][1]
    

    Cannot read property [0] of underfined

  • kthorngrenkthorngren Posts: 20,141Questions: 26Answers: 4,735

    This is according to the settings() docs:

    Generally speaking, use the information from the documented public API methods rather than that in this settings object, as the properties in it may change between versions.

    The order() API looks like it will provide the information you need.

    Kevin

This discussion has been closed.