higher to lower

higher to lower

nonameherenonamehere Posts: 10Questions: 1Answers: 0

Hi.
im getting crazy soon, how can i invert to the highest int comes first and its not at the bottom?!

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @nonamehere ,

    That's just the sort order - set that column to be desc.

    Cheers,

    Colin

  • nonameherenonamehere Posts: 10Questions: 1Answers: 0

    Hi Colin. It does not work.
    https://imgur.com/a/3VqEQBE

    Code:
    $('#datatable').DataTable( {
    "order": [[ 0, 'desc' ], [ 1, 'desc' ]]
    } );

  • nonameherenonamehere Posts: 10Questions: 1Answers: 0

    The "active" one has to be at the top, its also the one with the highest number.

    If it can get sorted actually, so all the "active" ones, will be on the top will it be perfect

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @nonamehere ,

    It works here. We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • nonameherenonamehere Posts: 10Questions: 1Answers: 0

    Can it be done over teamviewer if i PM you

  • nonameherenonamehere Posts: 10Questions: 1Answers: 0

    I got PHP over it to generate the fields, so it will be a bit difficult to get it over to a test bench

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    How the table is generated is likely to be less important than the data itself. If you could just paste the table into a test case, ready made, that should still demonstrate the problem.

  • nonameherenonamehere Posts: 10Questions: 1Answers: 0

    Okay, ill try, give me a second

  • nonameherenonamehere Posts: 10Questions: 1Answers: 0

    Didnt save, cant find where i save it

  • nonameherenonamehere Posts: 10Questions: 1Answers: 0

    There we go
    http://live.datatables.net/xocezefu/3/
    You can see it there

  • nonameherenonamehere Posts: 10Questions: 1Answers: 0

    I tried to set it to "order: [4, 'desc']", but then the actives are at the bottom, they have to be on the top

  • nonameherenonamehere Posts: 10Questions: 1Answers: 0

    I got it solved, i had a other script messing it up..

This discussion has been closed.