order

order

RambaldiRambaldi Posts: 9Questions: 3Answers: 0

Hi, I noticed that with ajax data order: [[3], 'asc'], it doesn't work. Sorting only works if I click on the column header

Answers

  • kthorngrenkthorngren Posts: 21,418Questions: 26Answers: 4,968

    order: [[3], 'asc'],

    Looks like a syntax error. Its missing the trailing ]. Should look like this:

    order: [[3], 'asc']],
    

    Kevin

  • RambaldiRambaldi Posts: 9Questions: 3Answers: 0

    I misspelled my post, order: [[3], 'asc']], doesn't work

  • kthorngrenkthorngren Posts: 21,418Questions: 26Answers: 4,968

    Sorry I missed it but you still have a syntax error. You should just have the integer 3 not an array. Like this:

    order: [[3, 'asc']]
    

    See the order docs for the proper syntax. If you stiill need help then please post your Datatables init code. Better is a link to a test case showing the issue.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

Sign In or Register to comment.