Custom html in TD's without messing with sorting?
Custom html in TD's without messing with sorting?
Hi there. First of all I love this plugin!
I have a lot of 3 Weeks ago kind of stuff in my columns (td's).
This messes up sorting.
Any way to tell my datatable: "Hey, THIS is my custom content, HERE is the actual value."?
Thanks in advance!
I have a lot of 3 Weeks ago kind of stuff in my columns (td's).
This messes up sorting.
Any way to tell my datatable: "Hey, THIS is my custom content, HERE is the actual value."?
Thanks in advance!
This discussion has been closed.
Replies
Allan
It would be nice to say .dataTable('valueGetter', 6, function() {return $(this).find('span').attr('title'))});
Where I could register a function to run when datatable requests to get th value of column 6. or something :P
For the moment you could use the hidden title sorting plug-in (which basically does do that, but isn't a particularly slick solution): http://datatables.net/plug-ins/sorting#hidden_title
Allan