"order" option but use columname instead of number

"order" option but use columname instead of number

wyattbikerwyattbiker Posts: 25Questions: 14Answers: 0

Is there a way to define the order to use name of column instead of #?

columns: [ 
    {data: 'last'},
    {data: 'first}
],
order: [[ 'last'  ,asc]]

Would prefer something like above if that is possible or some other concept so if a columns position shifts it doesn't affect the ordering.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,322Questions: 26Answers: 4,774

    According to the order docs only the column index is supported.

    Kevin

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Answer ✓

    The ability to use the column name (columns.name rather than columns.data) is something that I plan to introduce in future, but it currently is not supported.

    Allan

This discussion has been closed.