{hero}

autoFill.columns

Since: AutoFill 2.0.0

Select the columns that can be auto filled.
Please note - this property requires the AutoFill extension for DataTables.

Description

When working with complex tables it is not uncommon to have certain columns that you might not wish to allow a data fill on - for example a checkbox column that is used for row selection or a column with editing action buttons. This option can be used to define which columns can be auto filled. If a column cannot be auto filled, cells in it will not show the fill drag handle and will not be selectable during a drag.

Please note that only visible cells can be auto filled, so the columns defined by this option are automatically merged with the visible columns in the table. Non-visible columns will cannot be auto filled.

Type

column-selector

Description:

The columns that be auto filled. This accepts all of the options of column-selector such as class name selector, jQuery pseudo selects and column index selectors.

Default

  • Value:

Empty string (i.e. all columns)

Examples

Don't allow fill on the last column in the table:

new DataTable('#myTable', {
	autoFill: {
		columns: ':not(:last-child)'
	}
});

Allow fill only on column indexes 1, 2, 3, 4:

new DataTable('#myTable', {
	autoFill: {
		columns: [1, 2, 3, 4]
	}
});