how to sort column when it contains markup

how to sort column when it contains markup

vacholinovacholino Posts: 3Questions: 0Answers: 0
edited February 2013 in General
hello all,

I am using DataTables and loving it so far. Why didn't I know about this great plugin before? :)

I am stuck on a problem where I have a column that contains markup. The markup represents a progress bar and I would like to be able to sort by it. Can someone please help?

These are the 3 possible values that can be in the TD I want to sort:






Is there a way I can make this column sortable based on the markup you see above?

Any help is highly appreciated. Thanks!

Replies

  • vacholinovacholino Posts: 3Questions: 0Answers: 0
    anyone?
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    You need to use a sorting plug-in. A modification of this one should do the business for you: http://datatables.net/plug-ins/sorting#hidden_title

    Allan
  • vacholinovacholino Posts: 3Questions: 0Answers: 0
    Thank you Allan, that worked great! Thanks for an awesome plugin.
This discussion has been closed.