sType html and then numeric/date/string

sType html and then numeric/date/string

owenrichardowenrichard Posts: 2Questions: 0Answers: 0
edited January 2010 in General
Is it possible to use a combined sType of html and then numeric, date or string?

I.e. I have numeric, date, and string columns in my table, but all of them are surrounded by tags. Is it possible to strip the tags first and then define a type of either numeric, string, or date?

Thanks,
Richard

Replies

  • allanallan Posts: 63,508Questions: 1Answers: 10,471 Site admin
    Hi Richard,

    It's not possible to combine types, but it's certainly possible to do what you are looking for - just in a slightly different manner - using the sorting plug-ins:

    - Plug-ins: http://datatables.net/plug-ins/sorting
    - Example use: http://datatables.net/examples/api/sorting_plugin.html
    - Dev docs: http://datatables.net/development/sorting

    There is already a plug-in (and a type-detection plug-in I added for it yesterday) for HTML with numbers. And there is a bunch of other plug-ins for sorting various other data types.

    Regards,
    Allan
  • owenrichardowenrichard Posts: 2Questions: 0Answers: 0
    Thank you very much Allan, it's working great now.

    Richard
  • msandersmsanders Posts: 1Questions: 0Answers: 0
    I've been trying to do likewise but can't find the example use (404 link). I'd like to strip out html on columns then sort by uk date and european number on those columns.
    I've been to the working links above but can't get past the final hurdle here.

    Regards,
    Martin
This discussion has been closed.