SearchPanes: using order in dtOpts with multiple columns

SearchPanes: using order in dtOpts with multiple columns

montoyammontoyam Posts: 568Questions: 136Answers: 5
edited July 2021 in SearchPanes

unless my syntax is incorrect, If you have multiple columns included in your searchPane and you want to sort one column desc, all the other columns are sorted desc as well

http://live.datatables.net/toraqudo/114/edit

in case that link doesn't work, I basically added a second column to an existing example someone posted:
http://live.datatables.net/toraqudo/9/edit

            searchPanes: {
                layout: "columns-4",
                columns: [ 0,1],
                cascadePanes: true,
                dataLength: 45,
              dtOpts:{
                order:[[0,'desc'],[1,'asc']]
              }

This question has an accepted answers - jump to answer

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi @montoyam ,

    Do you mean that you want the first searchPane to sort in descending order and the second to sort ascending?

    i.e the first pane would read top to bottom "Folder Monitor" and then "AutoSubmit" below it. The second pane would read top to bottom "AXE", "DLL", "EXE"?

    If so you want to set different columns.searchPanes.dtOpts for different columns - like this example.

    Thanks,
    Sandy

  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    ah, yes. that is perfect.

    thanks.

Sign In or Register to comment.