ordering based on data - not displayed content

ordering based on data - not displayed content

sagimannsagimann Posts: 18Questions: 9Answers: 0

Hi, I have tried the "order without type detection" example code, to custom-order a column. But what I notice is that the sort function input is the display value of the cell - not the data behind it. So, for example, if I use some render function to manipulate my data while displaying it, the sort function will take the rendered data as input - not the original data as input.

How can I sort by the original data item instead of the rendered one?

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    But what I notice is that the sort function input is the display value of the cell - not the data behind it

    It depends on how DataTables is configured. You might be interested in reading the orthogonal data section of the manual.

    We would need a link to a test page to give a more specific answer.

    Allan

This discussion has been closed.