Manual order only

Manual order only

ronskyironskyi Posts: 2Questions: 1Answers: 0

Hi.
In DataTables, how can I provide manual only ordering?
That's mean I need not to order table when click on thead element.

Answers

  • ronskyironskyi Posts: 2Questions: 1Answers: 0

    Found:
    $('th').unbind('click.DT')

  • DirceuNazarethDirceuNazareth Posts: 44Questions: 1Answers: 12

    Instead of unbind it you could initialize DataTable not allowing sorting. Take a look in ordering to lock the sorting to all THeads. or columns.orderable for lock by column.

  • allanallan Posts: 63,815Questions: 1Answers: 10,517 Site admin

    If you use columns.orderable it will disable the end user's ability to click a column header to trigger sorting, but still allow the sorting to be defined by the API (order()) which it sounds like is what you want.

    Allan

This discussion has been closed.