I am using the jquery plugin DataTables for table sorting and manipulation. In a server-side call, my data returns an integer (0 or 1). If I were making a simple call in php this would be simple but I am trying to display “individual” or “family” based on the 0 or 1 returned from the server.
I am certain this needs to be done in the actual Datatables function:
$('#example').datables();
Is it possible to display a string in the presence of an integer in datatables?
Note: manipulting in the php script itself is not a valid solution here as the call is built dynamically from the start.
Yup, it can be done relatively easily. I imagine this is on a row-by-row basis, so your best best is to use the fnRowCallback in your initialization. Something like this (just a sample; I don’t know your full details):