Sorting on a rendered column?

Sorting on a rendered column?

jdegejdege Posts: 4Questions: 2Answers: 0

I have a datatable with a column that contains rendered markup, and the sorting on it doesn't work.

I'd be fine, right now, if it would sort on the underlying data, but that's not working.

I created a simple example:

http://live.datatables.net/bacobezu/1/

It has two "Age" columns. The first renders either "young", "middle", or "old", the second displays the age.

Sorting on the first column sorts on the text contained within the rendered markup. I want it to sort on the underlying data.

My guess this is simple, but I've not been able to figure it out.

Help?

This discussion has been closed.