How to sort by a hidden value

How to sort by a hidden value

MoomaMooma Posts: 1Questions: 0Answers: 0
edited November 2009 in General
Hello everyone, I've recently found this awesome tool and I have to say that I like it so much. My issue here is that I'm showing the "name" of an "id-name" table in a column but I want to sort by the "id" and not by the "name" showed. How can it be done? Do I need a hidden column with de "id" value? Give me some code examples please.

Thanks for all and sorry for the possible languaje errors, I'm spanish.

Replies

  • allanallan Posts: 61,840Questions: 1Answers: 10,134 Site admin
    Hi Mooma,

    You can tell one column to sort based on the data in a different column using the iDataSort ( http://datatables.net/usage/columns#iDataSort ) parameters. There is a code example in the documentation.

    Regards,
    Allan
This discussion has been closed.