Ordering asc or desc doesn't seem to have any effect

Ordering asc or desc doesn't seem to have any effect

PaladinPaladin Posts: 12Questions: 4Answers: 0

I want the result as achieved here: https://gyazo.com/212e40f45274e95019d611a3aad7e64d

I was hoping

"order": [[ 0, 'asc' ], [ 1, 'asc' ], [ 2, 'asc' ], [ 3, 'asc' ], [ 5, 'asc' ], [ 6, 'asc' ], [ 7, 'asc' ], [ 8, 'asc' ], [ 9, 'asc' ], [ 10, 'asc' ], [ 11, 'asc' ], [ 12, 'asc' ], [ 13, 'asc' ], [ 14, 'asc' ]],

would do it for me, tried setting column 13 as asc and desc, which is the date created table.

my site is: https://cointrust.pw/ It would reallllllly nice if I could set it to how it looks in the image above because that shows the latest profile added on top.

Replies

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26
    edited June 2016

    Hi

    When you enter more than one column into option it will try and do a multi-column sort. From what you are saying you just want the sorting to be enabled on the date created column only.
    Just remove all the other columns from option and just have
    "order": [[13, 'asc']]

    Here's an example of enabling default ordering

    Thanks

    Tom

  • PaladinPaladin Posts: 12Questions: 4Answers: 0

    That solved it! I want to mark your answer but can't... It doesn't show up.

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin

    You need to click the "Ask a Question" button rather than "New Discussion" to have the option of being able to mark a reply as an answer.

    Allan

This discussion has been closed.