{hero}

column().render()

Since: DataTables 2.0.0

Get rendered data for a column.

Description

This method provides access to the orthogonal data that DataTables uses for each cell (in this case, in the form of columns). This allows the same data to be used in different ways. A typical example of this is date / time data being used in numeric format (i.e. a timestamp) for sorting, but a complex formatted form for display.

The column().data() method provides access to the underlying raw data, while this method provides access to the rendered data for each type. It is provided to allow plug-in authors access to the orthogonal data available in the table.

Note that calling this method will evaluate the renderer for the cells in the column, rather than reading the information from cache (see column().cache() to read from cache and column().invalidate() to clear cache).

Type

function column().render( type )

Description:

Get rendered data for the selected column

Parameters:
Returns:

Any

Rendered data for the column of the requested type

Example

Get the display information for a column:

var table = new DataTable('#myTable');
var rendered = table.column(1).render();

console.log(rendered);

Related

The following options are directly related and may also be useful in your application development.