manipulating data for column filtering or global searching

manipulating data for column filtering or global searching

h.shengh.sheng Posts: 7Questions: 3Answers: 0

Hi,
I initialize datatable from fully populated HTML table. The data in some of the columns are wrapped in HTML tags, such as <td><span class="local">10.1.1.20</span><td>. I am able to create custom sorting functions to extract the actual data 10.1.1.20 from the wrapping tags.

When it comes to column filtering or global searching, is there a similar mechanism to the custom sorting so that the wrapping tags can be stripped off before the filtering or searching function is applied?

Thanks

Answers

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    My suggestion would be to use Orthogonal data for the sort and filter. If you strip the HTML for those two types then filtering should work out of the box but you may want to use the IP Address sorting plugin.

    Kevin

  • h.shengh.sheng Posts: 7Questions: 3Answers: 0

    Thank you very much for the answer.
    It solved my problem!

This discussion has been closed.