column()
Select a single column from a table.
Description
Select an individual column to work with from a DataTable, with its chained methods providing the ability to get work with the column, taking actions such as toggling its visibility or obtaining the data from the column.
Note that this method selects a single column. If the selector provided resolves to multiple columns, the result will be truncated to just a single column - the first one found. If you need to work with multiple columns, the columns()
method is available with the same selection options.
Type
function column( [ columnSelector ] [, modifier ] )
- Description:
Select the column found by a the column selector
- Parameters:
Name Type Optional 1 columnSelector
Yes - default: Column selector.
2 modifier
Yes - default: Option used to specify how the content's of the selected columns should be ordered, and if paging or filtering in the table should be taken into account. This is only useful for operations which involve rows, such as
column().nodes()
andcolumn().data()
.- Returns:
DataTables API instance with selected column in the result set.
Related
The following options are directly related and may also be useful in your application development.