columns.searchable
Since: DataTables 1.10
Enable or disable search on the data in this column.
Description
Using this parameter, you can define if DataTables should include this column in the filterable data in the table. You may want to use this option to disable search on generated columns such as 'Edit' and 'Delete' buttons for example.
Type
This option can be given in the following type(s):
Default
- Value:
true
Examples
Disable search on the first column with columnDefs
:
new DataTable('#myTable', {
columnDefs: [{ searchable: false, targets: 0 }]
});
Disable search on the first column with columns
:
new DataTable('#myTable', {
columns: [{ searchable: false }, null, null, null, null]
});
Related
The following options are directly related and may also be useful in your application development.