Search
9156 results 71-80
Examples
- Buttons › Export options - column selectorThe
exportOptions.columns
option of theprint
button provides the ability to select only certain columns (using acolumn-selector
). In this example only the visible columns are used for the printing. The column visibility buttons (colvis
) are included in this example so the column visibility can be easily changed. Additionally, the last column in the table, Salary, is hidden by default (usingcolumns.visible
). - Buttons › Format output data - export optionsthe table: orthogonal options and formatting functions as
- FixedHeader › Basic initialisationto use the default options or given as an
- FixedHeader › Alternative initialisationthe second is the options for the instance. In
- FixedHeader › Header and footer fixedare controlled by the options
- FixedHeader › Multiple tablesThe following example shows two DataTables enhanced tables both with FixedHeader enabled on them. This is done quite simply by initialising DataTables on both tables with the
fixedHeader
option set. This example also shows the footer being fixed in place for the two tables. - FixedHeader › Show / hide FixedHeaderThis example shows how to handle the case when the host DataTable is visible or not. FixedHeader needs to "be informed" if the table is visible or not (or if its position has changed on the page) so it can recalculate its cached values that are used to quickly look up what state the fixed header should be in at any given point. This is achieved through the
fixedHeader.adjust()
API method. This example shows a simple toggle button that changes the visibility of the DataTable. ThefixedHeader.adjust()
method is called whenever the table's visibility is changed, as it would be in a tab show event handler. - FixedHeader › Scrolling TableThis example shows a scrolling DataTable being used with FixedHeader. The integration between this extension and scrolling tables has not been supported in the past, but it is now fully supported. With scrolling tables the header will behave as it does always with FixedHeader. The footer will no longer float at the bottom of the page when it is in it's fixed state. Instead the table will resize appropriately so that the footer is always at the bottom of the screen.
- FixedHeader › Offset - manualIt is not uncommon to have a fixed element at the top or bottom of a web-page to act as a quick access menu to your end users. If you do employ this on the same page as FixedHeader, the software needs to be told to offset the fixed positioning of the header / footer. This can be done in one of two ways: Automatically, by assigning the class
fh-fixedHeader
orfh-fixedFooter
to the fixed elements Using thefixedHeader.headerOffset
andfixedHeader.footerOffset
options. This example takes the second approach, using thefixedHeader.headerOffset
option to assign a suitable offset. - FixedHeader › Offset - automaticIt is not uncommon to have a fixed element at the top or bottom of a web-page to act as a quick access menu to your end users. If you do employ this on the same page as FixedHeader, the software needs to be told to offset the fixed positioning of the header / footer. This can be done in one of two ways: Automatically, by assigning the class
fh-fixedHeader
orfh-fixedFooter
to the fixed elements Using thefixedHeader.headerOffset
andfixedHeader.footerOffset
options. This example demonstrates the first option where a header element has the classfh-fixedHeader
assigned to it. FixedHeader automatically detects this element and will offset the header by the required amount.
Forum
- 2nd Dec 2021When generating multiple Datatables, chosen options disappear when expanding child rows.I remove the chosen options altogether from the tables
- 17th Sep 2021Options does not use preset selectionsHi Andrey, The Options class has its own
- 27th Jul 2021Options empty in dropdown selectrebuilding the select dropdown options. Imagine this example http://live.datatables.net/kijujaha/1/edit
- 13th May 2021How to show multiple selected options?type: "select", multiple: true, options: [ { "label": "Audio","value": "6"}, { "label":
- 29th Mar 2021Custom order of options in a dropdown filterThis code, in your example, sorts and builds the select options: column.data().unique().each( function ( d, j ) { select.append( '<option value="'+d+'">'+d+'</option>' ); } ); You can replace it and build the options list in any order you like. Kevin
- 23rd Mar 2021DataTables with different types of filtering options on the same tablebe filtered by selected options. i.e. when selecting 'IT
- 18th Mar 2021Change row dropdown options based on inline changeconsole.log(val); console.log(JSON.stringify(data)); var retValue = { "options": { "3": [ { label: "", value: 0
- 11th Mar 2021Is there a way to change a secondary set of options based upon a prior select?select. Rather than displaying/offering options relevant to all 3
- 26th Feb 2021Update Field on Excel Export while dynamicly populating select optionshide the export buttons options $('.dt-button-collection').hide(); $('.dt-button-background').hide(); $('.DTE_Action_Edit').css('zIndex', 65000);
- 29th Jan 2021Options for increasing DOM downloadSee this FAQ about options to increase Datatables initialization