Force multi column sort

Force multi column sort

wolfbyteswolfbytes Posts: 4Questions: 2Answers: 0

Hi community,

is it possible to force multi column sort by default. I mean that a normal click on a header column triggers a multi column sort instead of the regular sort.

Thanks in Advance!

This question has accepted answers - jump to:

Answers

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

    Multi-column ordering is covered in the docs:

    http://datatables.net/examples/basic_init/multi_col_sort.html

  • wolfbyteswolfbytes Posts: 4Questions: 2Answers: 0

    Hi,

    thanks for the fast anwser.

    But i can't find how i can trigger the [SHIFT] + [LEFT MOUSE CLICK] behaviour with only a [LEFT MOUSE CLICK].

    Can you tell me the phrase where i can find that?

    Thanks in Advance!

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    That is exactly what the example @tangerine linked to is doing unless we've misunderstood what you are asking for. It applies a multi-column sort with a single click.

    Allan

  • wolfbyteswolfbytes Posts: 4Questions: 2Answers: 0

    Hi,

    in the link from @tangerine, i still have to hold on [SHIFT] for multi column sort.

    As you said: Maybe we are talking about different things ;-)

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Answer ✓

    Click on column 0 and it sorts by columns 0 and 1 - as the code shows.

    Perhaps the problem is that DataTables doesn't show you that multi-column sort and you want that? If so, there is currently no option for that.

    Allan

This discussion has been closed.