Sort on custom data

Sort on custom data

lkaushiklkaushik Posts: 1Questions: 0Answers: 0
edited January 2014 in DataTables 1.9
I am using a json object to display my data in the datatable.

Although I am passing the complete json object to the datatable function, I am only displaying some things in the json object in my data table.

But I want to sort my datatable with an attribute that I am not displaying.

Is this possible?

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Yes :-). Use mRender as a function. This blog post discusses that: http://datatables.net/blog/Orthogonal_Data . It uses mData (as it was written before mRender was added to DataTables), but the same basic idea applies with mRender, its just a bit easier to use!

    Allan
This discussion has been closed.