-
Notifications
You must be signed in to change notification settings - Fork 78
layout
layout: {
top: "{select}{search}",
bottom: "{info}{pager}"
},Allows for custom arranging of the DOM elements in the top and bottom containers. There are for 4 variables you can utilize:
-
{select}- The per-page dropdown -
{search}- The search input -
{info}- The info label (Showing X of Y entries) -
{pager}- The pager
A maximum of 2 variables per container (
toporbottom) is recommended. If you need to use more than 2 then you'll have to sort the CSS out to make them fit.
Note, also, that while the
{select},{search}and{info}variables are single-use only, the{pager}variable can be used multiple times to produce multiple pagers.
Use of the
{select}variable depends on the optionperPageSelectbeing enabled and use of the{search}variable depends on the optionsearchablebeing enabled. Trying to use these variables while their corresponding options are disabled will result in nothing being inserted.
Let's say you wanted the following layout:
---------------------------------
| info | pager |
---------------------------------
| |
| table |
| |
---------------------------------
| search | select |
---------------------------------
The markup for the top container would be:
layout: {
top: "{info}{pager}",
},and the markup for the bottom container would be:
layout: {
bottom: "{search}{select}",
},Combined:
layout: {
top: "{info}{pager}",
bottom: "{search}{select}"
},- datatable.init
- datatable.refresh
- datatable.update
- datatable.page
- datatable.sort
- datatable.perpage
- datatable.search
- perPage
- perPageSelect
- nextPrev
- prevText
- nextText
- firstLast
- firstText
- lastText
- searchable
- sortable
- truncatePager
- fixedColumns
- fixedHeight
- columns
- data
- ajax
- labels
- layout
- header
- footer
- table
- head DEPRECATED
- body DEPRECATED
- foot DEPRECATED
- wrapper
- container
- pagers
- headings
- options DEPRECATED
- initialized
- isIE DEPRECATED
- data
- activeRows DEPRECATED
- dataIndex
- pages
- hasRows
- hasHeadings
- currentPage
- totalPages
- onFirstPage
- onLastPage
- searching
- searchData