aaSorting based on column class instead index

aaSorting based on column class instead index

itajackassitajackass Posts: 121Questions: 37Answers: 3

Probably already asked, but I need to use aaSorting option with a class name intead an index.
Why?

Because I use colReorder with statesave options.

Is there a way to use it like:

aaSorting: [ 'myClassColum', 'DESC' ]

?

Answers

  • itajackassitajackass Posts: 121Questions: 37Answers: 3

    Ok solved with:

    "aaSorting": [[ $('#myTable tr th.myClassColum').index(), "DESC" ]]
    
This discussion has been closed.