Options

DataTables and its extensions are extremely configurable libraries and almost every aspect of the enhancements they make to HTML tables can be customised. Features can be enabled, disabled or customised to meet your exact needs for your table implementations. Customisation of these options are performed by defining options in the $().DataTable() constructor - for example, in the following code the scrollY and paging options are used to enable scrolling and disable pagination:

$('#myTable').DataTable( {
    scrollY: 300,
    paging: false
} );

There are a huge range of options to customise your tables, which are all fully documented below. For general information about how DataTables' initialisation options can be used, please refer to the options manual.

Library Name Summary
DataTables - Features

autoWidth

Feature control DataTables' smart column width handling

DataTables - Features

deferRender

Feature control deferred rendering for additional speed of initialisation.

DataTables - Features

info

Feature control table information display field

DataTables - Features

jQueryUI

Use markup and classes for the table to be themed by jQuery UI ThemeRoller.

DataTables - Features

lengthChange

Feature control the end user's ability to change the paging display length of the table.

DataTables - Features

ordering

Feature control ordering (sorting) abilities in DataTables.

DataTables - Features

paging

Enable or disable table pagination.

DataTables - Features

processing

Feature control the processing indicator.

DataTables - Features

scrollX

Horizontal scrolling

DataTables - Features

scrollY

Vertical scrolling

DataTables - Features

searching

Feature control search (filtering) abilities

DataTables - Features

serverSide

Feature control DataTables' server-side processing mode.

DataTables - Features

stateSave

State saving - restore table state on page reload

DataTables - Data

ajax.data

Add or modify data submitted to the server upon an Ajax request

DataTables - Data

ajax.dataSrc

Data property or manipulation method for table data

DataTables - Data

ajax

Load data for the table's content from an Ajax source

DataTables - Data

data

Data to use as the display data for the table.

DataTables - Callbacks

createdRow

Callback for whenever a TR element is created for the table's body.

DataTables - Callbacks

drawCallback

Function that is called every time DataTables performs a draw.

DataTables - Callbacks

footerCallback

Footer display callback function.

DataTables - Callbacks

formatNumber

Number formatting callback function.

DataTables - Callbacks

headerCallback

Header display callback function.

DataTables - Callbacks

infoCallback

Table summary information display callback.

DataTables - Callbacks

initComplete

Initialisation complete callback.

DataTables - Callbacks

preDrawCallback

Pre-draw callback.

DataTables - Callbacks

rowCallback

Row draw callback.

DataTables - Callbacks

stateLoadCallback

Callback that defines where and how a saved state should be loaded.

DataTables - Callbacks

stateLoaded

State loaded callback.

DataTables - Callbacks

stateLoadParams

State loaded - data manipulation callback

DataTables - Callbacks

stateSaveCallback

Callback that defines how the table state is stored and where.

DataTables - Callbacks

stateSaveParams

State save - data manipulation callback

DataTables - Options

deferLoading

Delay the loading of server-side data until second draw

DataTables - Options

destroy

Destroy any existing table matching the selector and replace with the new options.

DataTables - Options

displayStart

Initial paging start point

DataTables - Options

dom

Define the table control elements to appear on the page and in what order

DataTables - Options

lengthMenu

Change the options in the page length select list.

DataTables - Options

order

Initial order (sort) to apply to the table

DataTables - Options

orderCellsTop

Control which cell the order event handler will be applied to in a column

DataTables - Options

orderClasses

Highlight the columns being ordered in the table's body

DataTables - Options

orderFixed

Ordering to always be applied to the table

DataTables - Options

orderMulti

Multiple column ordering ability control.

DataTables - Options

pageLength

Change the initial page length (number of rows per page)

DataTables - Options

pagingType

Pagination button display options

DataTables - Options

renderer

Display component renderer types

DataTables - Options

retrieve

Retrieve an existing DataTables instance

DataTables - Options

rowId

Data property name that DataTables will use to set tr element DOM IDs

DataTables - Options

scrollCollapse

Allow the table to reduce in height when a limited number of rows are shown.

DataTables - Options

search.caseInsensitive

Control case-sensitive filtering option.

DataTables - Options

search.regex

Enable / disable escaping of regular expression characters in the search term.

DataTables - Options

search.search

Set an initial filtering condition on the table.

DataTables - Options

search.smart

Enable / disable DataTables' smart filtering

DataTables - Options

search

Set an initial filter in DataTables and / or filtering options.

DataTables - Options

searchCols

Define an initial search for individual columns.

DataTables - Options

searchDelay

Set a throttle frequency for searching

DataTables - Options

stateDuration

Saved state validity duration

DataTables - Options

stripeClasses

Set the zebra stripe class names for the rows in the table.

DataTables - Options

tabIndex

Tab index control for keyboard navigation

DataTables - Columns

columnDefs.targets

Assign a column definition to one or more columns.

DataTables - Columns

columnDefs

Set column definition initialisation properties.

DataTables - Columns

columns.cellType

Cell type to be created for a column

DataTables - Columns

columns.className

Class to assign to each cell in the column

DataTables - Columns

columns.contentPadding

Add padding to the text content used when calculating the optimal with for a table.

DataTables - Columns

columns.createdCell

Cell created callback to allow DOM manipulation

DataTables - Columns

columns.data

Set the data source for the column from the rows data object / array

DataTables - Columns

columns.defaultContent

Set default, static, content for a column

DataTables - Columns

columns.name

Set a descriptive name for a column

DataTables - Columns

columns.orderable

Enable or disable ordering on this column

DataTables - Columns

columns.orderData

Define multiple column ordering as the default order for a column

DataTables - Columns

columns.orderDataType

Live DOM sorting type assignment

DataTables - Columns

columns.orderSequence

Order direction application sequence

DataTables - Columns

columns.render

Render (process) the data for use in the table

DataTables - Columns

columns.searchable

Enable or disable filtering on the data in this column

DataTables - Columns

columns.title

Set the column title

DataTables - Columns

columns.type

Set the column type - used for filtering and sorting string processing

DataTables - Columns

columns.visible

Enable or disable the display of this column

DataTables - Columns

columns.width

Column width assignment

DataTables - Columns

columns

Set column specific initialisation properties.

DataTables - Internationalisation

language.aria.sortAscending

Language strings used for WAI-ARIA specific attributes

DataTables - Internationalisation

language.aria.sortDescending

Language strings used for WAI-ARIA specific attributes

DataTables - Internationalisation

language.aria

Language strings used for WAI-ARIA specific attributes

DataTables - Internationalisation

language.decimal

Decimal place character

DataTables - Internationalisation

language.emptyTable

Table has no records string

DataTables - Internationalisation

language.info

Table summary information display string

DataTables - Internationalisation

language.infoEmpty

Table summary information string used when the table is empty or records

DataTables - Internationalisation

language.infoFiltered

Appended string to the summary information when the table is filtered

DataTables - Internationalisation

language.infoPostFix

String to append to all other summary information strings

DataTables - Internationalisation

language.lengthMenu

Page length options string

DataTables - Internationalisation

language.loadingRecords

Loading information display string - shown when Ajax loading data

DataTables - Internationalisation

language.paginate.first

Pagination 'first' button string

DataTables - Internationalisation

language.paginate.last

Pagination 'last' button string

DataTables - Internationalisation

language.paginate.next

Pagination 'next' button string

DataTables - Internationalisation

language.paginate.previous

Pagination 'previous' button string

DataTables - Internationalisation

language.paginate

Pagination specific language strings

DataTables - Internationalisation

language.processing

Processing indicator string

DataTables - Internationalisation

language.search

Search input string

DataTables - Internationalisation

language.searchPlaceholder

Search input element placeholder attribute

DataTables - Internationalisation

language.thousands

Thousands separator

DataTables - Internationalisation

language.url

Load language information from remote file

DataTables - Internationalisation

language

Language configuration options for DataTables

DataTables - Internationalisation

language.zeroRecords

Table empty as a result of filtering string

AutoFill

autoFill.alwaysAsk

Always ask the end user if an action should be taken or not

AutoFill

autoFill.columns

Select the columns that can be auto filled

AutoFill

autoFill.editor

Attach an Editor instance for database updating

AutoFill

autoFill.focus

Action that will cause the auto fill drag handle to appear in a cell

AutoFill

autoFill.update

Control automatic of data when a fill drag is completed

AutoFill

autoFill

Enable and configure the AutoFill extension for DataTables

AutoFill

language.autoFill.button

Multi-fill selector button text

AutoFill

language.autoFill.cancel

Multi-fill selector cancel option message

AutoFill

language.autoFill.fill

Multi-fill selector message for the full fill fill type

AutoFill

language.autoFill.fillHorizontal

Multi-fill selector message for the horizontal fill fill type

AutoFill

language.autoFill.fillVertical

Multi-fill selector message for the vertical fill fill type

AutoFill

language.autoFill.increment

Multi-fill selector message for the increment fill type

AutoFill

language.autoFill.info

Information message shown at the top of the fill type selector

AutoFill

language.autoFill

Container object for language strings used by AutoFill

Buttons

buttons.buttons.action

Action to take when the button is activated

Buttons

buttons.buttons.available

Ensure that any requirements have been satisfied before initialising a button

Buttons

buttons.buttons.className

Set the class name for the button

Buttons

buttons.buttons.destroy

Function that is called when the button is destroyed

Buttons

buttons.buttons.enabled

Set a button's initial enabled state

Buttons

buttons.buttons.extend

Define which button type the button should be based on

Buttons

buttons.buttons.init

Initialisation function that can be used to add events specific to this button

Buttons

buttons.buttons.key

Define an activation key for a button

Buttons

buttons.buttons.name

Set a name for each selection

Buttons

buttons.buttons.namespace

Unique namespace for every button

Buttons

buttons.buttons.text

The text to show in the button

Buttons

buttons.buttons

List of buttons to be created

Buttons

buttons.dom.button

DOM configuration for individual button elements

Buttons

buttons.dom.buttonContainer

DOM configuration of a button container element

Buttons

buttons.dom.buttonLiner

DOM configuration of a button liner element

Buttons

buttons.dom.collection

DOM configuration of the collection display

Buttons

buttons.dom.container

DOM configuration of the Buttons container element

Buttons

buttons.dom

Options to control the DOM structure Buttons creates

Buttons

buttons.name

Set a name for the instance for the group selector

Buttons

buttons

Buttons configuration object

ColReorder

colReorder.fixedColumnsLeft

Disallow x columns from reordering (counting from the left)

ColReorder

colReorder.fixedColumnsRight

Disallow x columns from reordering (counting from the right)

ColReorder

colReorder.order

Set a default order for the columns in the table

ColReorder

colReorder.realtime

Enable / disable live reordering of columns during a drag

ColReorder

colReorder

Enable and configure the ColReorder extension for DataTables

Editor

columns.editField

Define which field a column should trigger editing on

FixedColumns

fixedColumns.heightMatch

Row height matching algorithm to use

FixedColumns

fixedColumns.leftColumns

Number of columns to fix to the left of the table

FixedColumns

fixedColumns.rightColumns

Number of columns to fix to the right of the table

FixedColumns

fixedColumns

Enable and configure the FixedColumns extension for DataTables

FixedHeader

fixedHeader.footer

Enable / disable fixed footer

FixedHeader

fixedHeader.footerOffset

Offset the table's fixed footer

FixedHeader

fixedHeader.header

Enable / disable fixed header

FixedHeader

fixedHeader.headerOffset

Offset the table's fixed header

FixedHeader

fixedHeader

FixedHeader configuration object

KeyTable

keys.blurable

Allow KeyTable's focus to be blurred (removed) from a table

KeyTable

keys.className

Set the class name used for the focused cell

KeyTable

keys.columns

Select the columns that can gain focus

KeyTable

keys.editor

Attach an Editor instance for Excel like editing

KeyTable

keys.focus

Cell to receive initial focus in the table

KeyTable

keys.keys

Limit the keys that KeyTable will listen for and take action on

KeyTable

keys.tabIndex

Set the table's tab index for when it will receive focus

KeyTable

keys

Enable and configure the KeyTable extension for DataTables

Responsive

responsive.breakpoints

Set the breakpoints for a Responsive instance

Responsive

responsive.details.renderer

Define the renderer used to display the child rows

Responsive

responsive.details.target

Column / selector for child row display control when using column details type

Responsive

responsive.details.type

Set the child row display control type

Responsive

responsive.details

Enable and configure the child rows shown by Responsive for collapsed tables

Responsive

responsive

Enable and configure the Responsive extension for DataTables

RowReorder

rowReorder.dataSrc

Configure the data point that will be used for the reordering data

RowReorder

rowReorder.editor

Attach an Editor instance for database updating

RowReorder

rowReorder.selector

Define the selector used to pick the elements that will start a drag

RowReorder

rowReorder.snapX

Horizontal position control of the row being dragged

RowReorder

rowReorder.update

Control automatic of data when a row is dropped

RowReorder

rowReorder

Enable and configure the RowReorder extension for DataTables

Scroller

scroller.boundaryScale

Set the point at which new data will be loaded and drawn

Scroller

scroller.displayBuffer

Display a loading message while Scroller is loading additional data

Scroller

scroller.loadingIndicator

Display a loading message while Scroller is loading additional data

Scroller

scroller.rowHeight

Time delay before new data is requested when server-side processing is enabled

Scroller

scroller.serverWait

Time delay before new data is requested when server-side processing is enabled

Scroller

scroller

Enable and configure the Scroller extension for DataTables

Select

language.select.cells

Table information summary string for the number of cells selected

Select

language.select.columns

Table information summary string for the number of columns selected

Select

language.select.rows

Table information summary string for the number of rows selected

Select

language.select

Container object for language strings used by Select

Select

select.blurable

Indicate if the selected items will be removed when clicking outside of the table

Select

select.info

Enable / disable the display for item selection information in the table summary.

Select

select.items

Set which table items to select (rows, columns or cells)

Select

select.selector

Set the element selector used for mouse event capture to select items

Select

select.style

Set the selection style for end user interaction with the table

Select

select

Select configuration object