How to reorder the rows in the table from last to first instead?

How to reorder the rows in the table from last to first instead?

MidaIganesMidaIganes Posts: 11Questions: 5Answers: 0

From what I've seen the ordering option does it alphabetically on the first column? Which gives me the image that it isn't meant for this sort of an operation?
There's rowreorder, which just got me confused. Is it a single row or by rows?

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Documentation for ordering is here:
    https://datatables.net/reference/option/ordering

    You define a default sort sequence in your DT initialisation. After that, sorting is done by clicking column headings, unless disabled by the developer.

  • kthorngrenkthorngren Posts: 21,173Questions: 26Answers: 4,923

    The order option is used to set the initial table order. By default the order is the first column ascending. See this example.

    There is a RowReorder extension which allows for the user to drag and drop rows to change the order. See this example.

    Kevin

  • MidaIganesMidaIganes Posts: 11Questions: 5Answers: 0

    So from what I can see, rowreorder is something completely different.
    The order option is more or less what im looking for, but without an index row I'm unable to order the rows with it in a way where it's last to first.

  • kthorngrenkthorngren Posts: 21,173Questions: 26Answers: 4,923

    Its hard to say why without seeing what you have. If the problem is with dates then see this blog discussing how to order dates. If you still need help please post a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

This discussion has been closed.