Why does the table get ordered?

Why does the table get ordered?

lordconflordconf Posts: 2Questions: 1Answers: 0

I just started using your script but when using

$('#TableID').DataTable({ paging: false, searching: false});

I noticed the values get ordered by values in the first column alphabetically which is not a desirable behaviour for me. I just want the table to be shown as in DOM and let the user order the columns if he/she wants to (and clicks)

Thanks for help

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 56,849Questions: 1Answers: 9,035 Site admin
    Answer ✓

    Ordering is enabled by default in DataTables, and will order on the first column. If you want user ordering available, but no initial defined order, use the order option and set it to be an empty array.

    Allan

  • lordconflordconf Posts: 2Questions: 1Answers: 0

    Thank you very much for your quick reply :)

Sign In or Register to comment.