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.
Name¶
Default name/id is "DataTableId"
.
Ordering¶
Disable or enable ordering, default is true
.
Orders¶
If ordering is enabled (ordering), then DataTables will perform a first pass order during initialisation. Using this parameter you can define which column(s) the order is performed upon, and the ordering direction.
Searching¶
Disable or enable searching, default is true
.
Dom¶
Dom allow to control position of datatable elements.
Style¶
Set css class of table, default is "display dataTable"
.
Paging¶
Disable or enable paging, default is true
.
Render¶
The Render method finalizes the control configuration and outputs the necessary HTML and scripts for the control.
It is possible to separate script and HTML rendering.ServerSide¶
Enable server-side processing mode, default is false
.
PageLength¶
Define table page length. default is 10
.
Processing¶
Enable or disable the display of a 'processing' indicator when the table is being processed, default is true
.
ScrollX¶
Enable horizontal scrolling. When a table is too wide to fit into a certain layout, or you have a large number of columns in the table,
you can enable horizontal (x) scrolling to show the table in a viewport, which can be scrolled, default is false
.
StateSave¶
Enable or disable state saving such as pagination position, display length, filtering and sorting information, default is false
.
Caption¶
LengthMenu¶
Change the options in the page length select list.