Rendering plug-ins

Data renderer's can be used to transform data from a feed from one format into another. This can be useful if you want to customise the data the user sees - for example showing an ISO8601 date from a feed as a localised data format.

DataTables has two built in renderers (number and text), which can be expended upon through the plug-ins below. More can also be created as required - please see this blog post for a full description on creating your own plug-ins.

How to use

Rendering plug-ins are really just functions that are attached to the columns.render option. See the DataTables renderers documentation for more details.

As an example the code below makes use of the ellipsis plug-in saved into a file:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.dataTables.js"></script>
<script type="text/javascript" src="dataTables.ellipsis.js"></script>
<script type="text/javascript">
    $('#myTable').DataTable( {
        columnDefs: [ {
            targets: 0,
            render: $.fn.dataTable.render.ellipsis()
        } ]
    } );