Options
DataTables and its extensions are extremely configurable libraries and almost every aspect of the enhancements they make to HTML tables can be customised. The full set of options that available through the DataTables options object are listed below.
A small example of how to use the initialisation options is shown below - in this case enabling scrolling and disabling page. For general information about how DataTables' initialisation options can be used, please refer to the options manual.
new DataTable('#myTable', {
scrollY: 300,
paging: false
});
| Name | Summary | Library | Group |
|---|---|---|---|
Set how DataTables will report detected errors | DataTables | static | |
Load data for the table's content from an Ajax source | DataTables | data | |
Add or modify data submitted to the server upon an Ajax request | DataTables | data | |
Data property or manipulation method for table data | DataTables | data | |
Set the data parameter submission format | DataTables | data | |
Enable and configure the AutoFill extension for DataTables | AutoFill | ||
Always ask the end user if an action should be taken or not | AutoFill | ||
Select the columns that can be auto filled | AutoFill | ||
Attach an Editor instance for database updating | AutoFill | ||
Initial enablement state of AutoFill | AutoFill | ||
Action that will cause the auto fill drag handle to appear in a cell | AutoFill | ||
Enable / disable user ability to horizontally drag and fill | AutoFill | ||
Control automatic update of data when a fill drag is completed | AutoFill | ||
Enable / disable user ability to vertically drag and fill | AutoFill | ||
Feature control DataTables' smart column width handling | DataTables | feature | |
Button that is enabled when SearchBuilder is to be used through a button | SearchBuilder | ||
Buttons configuration object | Buttons | ||
List of buttons to be created | Buttons | ||
Action to take when the button is activated | Buttons | ||
Indicate that a button's action processing should be performed asynchronously. | Buttons | ||
Collection of attribute key / values to set for a button | Buttons | ||
Ensure that any requirements have been satisfied before initialising a button | Buttons | ||
Set the class name for the button | Buttons | ||
Function that is called when the button is destroyed | Buttons | ||
Show a dropdown (further action) icon | Buttons | ||
Set a button's initial enabled state | Buttons | ||
Define which button type the button should be based on | Buttons | ||
Initialisation function that can be used to add events specific to this button | Buttons | ||
Define an activation key for a button | Buttons | ||
Set a name for each selection | Buttons | ||
Unique namespace for every button | Buttons | ||
Split dropdown buttons | Buttons | ||
Set the tag for the button | Buttons | ||
The text to show in the button | Buttons | ||
Button | Buttons | ||
Set a name for the instance for the group selector | Buttons | ||
Set a caption for the table | DataTables | feature | |
Enable and configure the CardView extension for DataTables | CardView | ||
Set the responsive breakpoints for the column count | CardView | ||
Set the columns to include in repeating templates | CardView | ||
Define the number of columns to show at each breakpoint | CardView | ||
Set the CardView start up mode | CardView | ||
Set the orthogonal data fetch type | CardView | ||
Determine how CardView will handle the table's page length | CardView | ||
Set the responsive breakpoint automatic card view | CardView | ||
Set the template to use for the card view | CardView | ||
Enable and configure the ColReorder extension for DataTables | ColReorder | ||
Select which columns can be reordered | ColReorder | ||
Initial enablement state of ColReorder | ColReorder | ||
Select which columns can be reordered | ColReorder | ||
Set a default order for the columns in the table | ColReorder | ||
Configure ColumnControl for DataTables | ColumnControl | ||
Add a class name to a ColumnControl target row | ColumnControl | ||
Define which content types to show | ColumnControl | ||
Set which row in the header / footer the content should apply to | ColumnControl | ||
Set column definition initialisation properties. | DataTables | columns | |
Alias of | DataTables | columns | |
Assign a column definition to one or more columns. | DataTables | columns | |
Set column specific initialisation properties. | DataTables | columns | |
Set the columns' | DataTables | columns | |
Cell type to be created for a column | DataTables | columns | |
Class to assign to each cell in the column | DataTables | columns | |
Specific ColumnControl configurations for columns | ColumnControl | ||
Add padding to the text content used when calculating the optimal width for a table. | DataTables | columns | |
Cell created callback to allow DOM manipulation | DataTables | columns | |
Set the data source for the column from the rows data object / array | DataTables | columns | |
Set default, static, content for a column | DataTables | columns | |
Define which field a column should trigger editing on | Editor | ||
Set the column footer text | DataTables | columns | |
Set a descriptive name for a column | DataTables | columns | |
Define multiple column ordering as the default order for a column | DataTables | columns | |
Live DOM sorting type assignment | DataTables | columns | |
Order direction application sequence | DataTables | columns | |
Enable or disable ordering on this column | DataTables | columns | |
Render (process) the data for use in the table | DataTables | columns | |
Set column's visibility priority | Responsive | ||
Per column initial search configuration | DataTables | columns | |
Set a default condition for this column | SearchBuilder | ||
Set values of orthogonal data for rendering functions | SearchBuilder | ||
Set a custom title for a column in SearchBuilder | SearchBuilder | ||
Set the SearchBuilder type to use for a column | SearchBuilder | ||
Enable or disable search on the data in this column | DataTables | columns | |
Set the column title | DataTables | columns | |
Set the column type - used for filtering and sorting string processing | DataTables | columns | |
Enable or disable the display of this column | DataTables | columns | |
Column width assignment | DataTables | columns | |
Callback for whenever a TR element is created for the table's body. | DataTables | callback | |
Data to use as the display data for the table. | DataTables | data | |
Delay the loading of server-side data until second draw | DataTables | option | |
Feature control deferred rendering for additional speed of initialisation. | DataTables | feature | |
Destroy any existing table matching the selector and replace with the new options. | DataTables | option | |
Initial paging start point | DataTables | option | |
Define the table control elements to appear on the page and in what order | DataTables | option | |
Function that is called every time DataTables performs a draw. | DataTables | callback | |
Enable and configure the FixedColumns extension for DataTables | FixedColumns | ||
Number of columns to fix to the end of the table | FixedColumns | ||
Number of columns to fix to the left of the table | FixedColumns | ||
Number of columns to fix to the left of the table | FixedColumns | ||
Number of columns to fix to the right of the table | FixedColumns | ||
Number of columns to fix to the right of the table | FixedColumns | ||
Number of columns to fix to the start of the table | FixedColumns | ||
FixedHeader configuration object | FixedHeader | ||
Enable / disable fixed footer | FixedHeader | ||
Offset the table's fixed footer | FixedHeader | ||
Enable / disable fixed header | FixedHeader | ||
Offset the table's fixed header | FixedHeader | ||
Footer display callback function. | DataTables | callback | |
Number formatting callback function. | DataTables | callback | |
Header display callback function. | DataTables | callback | |
Feature control table information display field | DataTables | feature | |
Table summary information display callback. | DataTables | callback | |
Initialisation complete callback. | DataTables | callback | |
Enable and configure the KeyTable extension for DataTables | KeyTable | ||
Allow KeyTable's focus to be blurred (removed) from a table | KeyTable | ||
Set the class name used for the focused cell | KeyTable | ||
Enable / disable clipboard interaction with KeyTable | KeyTable | ||
Set the orthogonal data to copy to clipboard | KeyTable | ||
Select the columns that can gain focus | KeyTable | ||
Control if editing should be activated immediately upon focus | KeyTable | ||
Attach an Editor instance for Excel like editing | KeyTable | ||
Cell to receive initial focus in the table | KeyTable | ||
Limit the keys that KeyTable will listen for and take action on | KeyTable | ||
Set the table's tab index for when it will receive focus | KeyTable | ||
Language configuration options for DataTables | DataTables | i18n | |
Load language information from remote locations | DataTables | i18n | |
Language strings used for WAI-ARIA specific attributes | DataTables | i18n | |
Language string used for WAI-ARIA column orderable label | DataTables | i18n | |
Language string used for WAI-ARIA column label to alter column's ordering | DataTables | i18n | |
Language string used for WAI-ARIA column label to alter column's ordering | DataTables | i18n | |
WAI-ARIA labels for pagination buttons | DataTables | i18n | |
WAI-ARIA label for the first pagination button | DataTables | i18n | |
WAI-ARIA label for the last pagination button | DataTables | i18n | |
WAI-ARIA label for the next pagination button | DataTables | i18n | |
WAI-ARIA label for the number pagination buttons | DataTables | i18n | |
WAI-ARIA label for the previous pagination button | DataTables | i18n | |
Language strings used for WAI-ARIA specific attributes | DataTables | i18n | |
Language strings used for WAI-ARIA specific attributes | DataTables | i18n | |
Container object for language strings used by AutoFill | AutoFill | ||
Multi-fill selector button text | AutoFill | ||
Multi-fill selector cancel option message | AutoFill | ||
Multi-fill selector message for the full fill fill type | AutoFill | ||
Multi-fill selector message for the horizontal fill fill type | AutoFill | ||
Multi-fill selector message for the vertical fill fill type | AutoFill | ||
Multi-fill selector message for the increment fill type | AutoFill | ||
Information message shown at the top of the fill type selector | AutoFill | ||
Set the text within the StateRestore creation button | StateRestore | ||
Set the text within the StateRestore remove all button | StateRestore | ||
Set the text within the StateRestore remove button | StateRestore | ||
Set the text within the StateRestore rename button | StateRestore | ||
Set the text within the StateRestore | StateRestore | ||
Set the text within the StateRestore | StateRestore | ||
Set the text within the StateRestore update button | StateRestore | ||
Set the strings that are used by ColumnControl content types | ColumnControl | ||
Decimal place character | DataTables | i18n | |
Table has no records string | DataTables | i18n | |
Replacement pluralisation for table data type | DataTables | i18n | |
Set FixedColumns button text | FixedColumns | ||
Table summary information display string | DataTables | i18n | |
Table summary information string used when the table is empty of records | DataTables | i18n | |
Appended string to the summary information when the table is filtered | DataTables | i18n | |
String to append to all other summary information strings | DataTables | i18n | |
Specify the labels for the page length dropdown | DataTables | i18n | |
Page length options string | DataTables | i18n | |
Loading information display string - shown when Ajax loading data | DataTables | i18n | |
Pagination specific language strings | DataTables | i18n | |
Pagination 'first' button string | DataTables | i18n | |
Pagination 'last' button string | DataTables | i18n | |
Pagination 'next' button string | DataTables | i18n | |
Pagination 'previous' button string | DataTables | i18n | |
Processing indicator string | DataTables | i18n | |
Search input string | DataTables | i18n | |
Set the message to be displayed in the SearchBuilder add button | SearchBuilder | ||
Set SearchBuilder button text | SearchBuilder | ||
Text to be displayed in the SearchBuilder clear all button | SearchBuilder | ||
Set the placeholder text for the SearchBuilder condition | SearchBuilder | ||
Define custom condition names for SearchBuilder conditions | SearchBuilder | ||
Set the condition names for columns that use arrays | SearchBuilder | ||
Set the condition names for the date column type | SearchBuilder | ||
Set the condition names for the number column type | SearchBuilder | ||
Set the condition names for the string column type | SearchBuilder | ||
The object containing the condition names for a specific type | SearchBuilder | ||
Set the placeholder text for the SearchBuilder data | SearchBuilder | ||
Set the html of the SearchBuilder delete criteria button | SearchBuilder | ||
Set the | SearchBuilder | ||
Set the text of the SearchBuilder left button | SearchBuilder | ||
Set the title attribute of the SearchBuilder left button | SearchBuilder | ||
Message to display when AND logic is in place | SearchBuilder | ||
Message to display when OR logic is in place | SearchBuilder | ||
Set the text of the SearchBuilder right button | SearchBuilder | ||
Set the title attribute of the SearchBuilder right button | SearchBuilder | ||
Text to show in the "perform search" button | SearchBuilder | ||
Set the SearchBuilder Title text | SearchBuilder | ||
Set the placeholder text for the SearchBuilder value | SearchBuilder | ||
Set the text between the value input elements where two are required | SearchBuilder | ||
Search input element placeholder attribute | DataTables | i18n | |
Container object for language strings used by Select | Select | ||
Text to use as the aria-label for the header checkbox | Select | ||
Text to use as the aria-label for the row selection checkboxes | Select | ||
Table information summary string for the number of cells selected | Select | ||
Table information summary string for the number of columns selected | Select | ||
Table information summary string for the number of rows selected | Select | ||
Container for options for language | StateRestore | ||
Set the text for the elements that are shown within the creation modal | StateRestore | ||
Set the text within the StateRestore creation modal button | StateRestore | ||
Set the text for the label of the columns search checkbox within the creation modal | StateRestore | ||
Set the text for the label of the column visibility checkbox within the creation modal | StateRestore | ||
Set the text for the label of the page length checkbox within the creation modal | StateRestore | ||
Set the text for the label of the name input within the creation modal | StateRestore | ||
Set the text for the label of the order checkbox within the creation modal | StateRestore | ||
Set the text for the label of the paging checkbox within the creation modal | StateRestore | ||
Set the text for the label of the | StateRestore | ||
Set the text for the label of the search checkbox within the creation modal | StateRestore | ||
Set the text for the label of the | StateRestore | ||
Set the text for the label of the | StateRestore | ||
Set the text for the label of the | StateRestore | ||
Set the text for the title of the creation modal | StateRestore | ||
Set the label text shown beside the toggle check boxes | StateRestore | ||
Set the error message shown when attempting to rename a state to one that already exists | StateRestore | ||
Set the error message shown when incorrectly renaming a state to an empty string | StateRestore | ||
Set the text that is shown in the savedStates collection when there are no saved states | StateRestore | ||
Set the confirmation message shown within the StateRestore remove modal | StateRestore | ||
Set the error message shown when incorrectly removing a state | StateRestore | ||
Set the joiner used between states within the StateRestore remove modal | StateRestore | ||
Set the text within the StateRestore remove button | StateRestore | ||
Set the title shown in the StateRestore remove modal | StateRestore | ||
Set the text within the StateRestore remove button | StateRestore | ||
Set the label next to the input element within the StateRestore rename modal | StateRestore | ||
Set the title shown in the StateRestore rename modal | StateRestore | ||
Thousands separator | DataTables | i18n | |
Load language information from remote file | DataTables | i18n | |
Table empty as a result of filtering string | DataTables | i18n | |
Define and position the table control elements to appear on the page | DataTables | option | |
Feature control the end user's ability to change the paging display length of the table. | DataTables | feature | |
Change the options in the page length | DataTables | option | |
Add event listeners to the DataTable during initialisation. | DataTables | callback | |
Initial order (sort) to apply to the table | DataTables | option | |
Control which cell the order event handler will be applied to in a column | DataTables | option | |
Highlight the columns being ordered in the table's body | DataTables | option | |
Control if the initial data order is reversed when | DataTables | option | |
Ordering to always be applied to the table | DataTables | option | |
Multiple column ordering ability control. | DataTables | option | |
Feature control ordering (sorting) abilities in DataTables. | DataTables | feature | |
Control the click to order listener for column headers. | DataTables | feature | |
Control the display of the ordering indicators in header cells. | DataTables | feature | |
Change the initial page length (number of rows per page) | DataTables | option | |
Enable or disable table pagination. | DataTables | feature | |
Pagination button display options | DataTables | option | |
Pre-draw callback. | DataTables | callback | |
Feature control the processing indicator. | DataTables | feature | |
Display component renderer types | DataTables | option | |
Enable and configure the Responsive extension for DataTables | Responsive | ||
Set the breakpoints for a Responsive instance | Responsive | ||
Enable and configure the child rows shown by Responsive for collapsed tables | Responsive | ||
Define how the hidden information should be displayed to the end user | Responsive | ||
Define the renderer used to display the child rows | Responsive | ||
Column / selector for child row display control when using | Responsive | ||
Set the child row display control type | Responsive | ||
Set the orthogonal data request type for the hidden information display | Responsive | ||
Retrieve an existing DataTables instance | DataTables | option | |
Row draw callback. | DataTables | callback | |
Enable and configure the RowGroup extension for DataTables | RowGroup | ||
Set the class name to be used for the grouping rows | RowGroup | ||
Set the data point to use as the grouping data source | RowGroup | ||
Text to show for rows which have | RowGroup | ||
Provides the ability to disable row grouping at initialisation | RowGroup | ||
Set the class name to be used for the grouping end rows | RowGroup | ||
Provide a function that can be used to control the data shown in the end grouping row. | RowGroup | ||
Set the class name to be used for the grouping start rows | RowGroup | ||
Provide a function that can be used to control the data shown in the start grouping row. | RowGroup | ||
Data property name that DataTables will use to set | DataTables | option | |
Enable and configure the RowReorder extension for DataTables | RowReorder | ||
Enable / disable the canceling of the drag and drop interaction | RowReorder | ||
Configure the data point that will be used for the reordering data | RowReorder | ||
Attach an Editor instance for database updating | RowReorder | ||
Enable / disable RowReorder's user interaction | RowReorder | ||
Set the options for the Editor form when submitting data | RowReorder | ||
Define the selector used to pick the elements that will start a drag | RowReorder | ||
Horizontal position control of the row being dragged | RowReorder | ||
Control automatic of data when a row is dropped | RowReorder | ||
Allow the table to reduce in height when a limited number of rows are shown. | DataTables | option | |
Horizontal scrolling | DataTables | feature | |
Vertical scrolling | DataTables | feature | |
Enable and configure the Scroller extension for DataTables | Scroller | ||
Set the point at which new data will be loaded and drawn | Scroller | ||
The amount of data that Scroller should pre-buffer to ensure smooth scrolling | Scroller | ||
Set the row height, or how the row height is calculated | Scroller | ||
Time delay before new data is requested when server-side processing is enabled | Scroller | ||
Set an initial search in DataTables and / or search options. | DataTables | option | |
Control case-sensitive filtering option. | DataTables | option | |
Enable / disable escaping of regular expression characters in the search term. | DataTables | option | |
Enable / disable DataTables' search on return | DataTables | option | |
Set an initial filtering condition on the table. | DataTables | option | |
Enable / disable DataTables' smart filtering | DataTables | option | |
Enable and configure the SearchBuilder extension for DataTables | SearchBuilder | ||
Restrict which columns can be filtered on | SearchBuilder | ||
Define custom conditions for SearchBuilder | SearchBuilder | ||
Impose a limit on the depth of the groups | SearchBuilder | ||
Trigger a search on the enter key rather than every keypress | SearchBuilder | ||
Function to update title text when selections are made. | SearchBuilder | ||
Removes the colours from SearchBuilder | SearchBuilder | ||
Control live search operation | SearchBuilder | ||
Set the default logic operator | SearchBuilder | ||
Set a predefined search query | SearchBuilder | ||
Define an initial search for individual columns. | DataTables | option | |
Set a delay for search operations | DataTables | option | |
Feature control search (filtering) abilities | DataTables | feature | |
Select configuration object | Select | ||
Indicate if the selected items will be removed when clicking outside of the table | Select | ||
Set the class name that will be applied to selected items | Select | ||
Control automatic addition of header checkbox | Select | ||
Enable / disable the display for item selection information in the table summary. | Select | ||
Set which table items to select (rows, columns or cells) | Select | ||
Keyboard navigation and selection of rows in the table | Select | ||
Allow keyboard navigation to wrap | Select | ||
Set a function that will determine if a row should be selectable. | Select | ||
Set the element selector used for mouse event capture to select items | Select | ||
Set the selection style for end user interaction with the table | Select | ||
Disable the deselection of selected rows when clicked | Select | ||
Feature control DataTables' server-side processing mode. | DataTables | feature | |
Saved state validity duration | DataTables | option | |
Callback that defines where and how a saved state should be loaded. | DataTables | callback | |
State loaded - data manipulation callback | DataTables | callback | |
State loaded callback. | DataTables | callback | |
State saving - restore table state on page reload | DataTables | feature | |
Callback that defines how the table state is stored and where. | DataTables | callback | |
State save - data manipulation callback | DataTables | callback | |
Tab index control for keyboard navigation | DataTables | option | |
Control which row in the header is the title row | DataTables | option | |
Ability to enable / disable auto type detection | DataTables | option |