display
Set the display controller for the main form interface.
Please note - this property requires the Editor extension for DataTables.
Description
To show the main form to the end user, Editor uses a display controller. In basic terms, Editor will request that the display controller show the main form, but exactly how it does that display is entirely up to the display controller. This provides a huge amount of flexibility in Editor as your form can be show in any way you want!
There are three display controllers built into Editor:
Each display controller has its own options for configuration. Please refer to the documentation for the display controller for what options are available and how they can be configured.
Additional display controllers can be added to Editor as plug-ins. For information on how to develop display controllers, please refer to the Editor developer documentation. The styling integrations for Editor may also include their own display controllers - for example:
bootstrap- Uses Bootstrap's modal modulefoundation- Uses Foundation's Revealjqueryui- Uses jQuery UI's modal library
Please note that this option does not effect the display of the bubble and inline editing (bubble() and inline()) options of Editor.
This option can also be used as a shorthand for the static display controller. If a value is given here, which does not match the name of a display controller (i.e. isn't one of those listed above), Editor will assume that the string is a CSS selector and pick the matching element from the document for use with the static display controller.
Type
This option can be given in the following type(s):
Default
- Value:
lightbox
Use the lightbox display controller.
Examples
Set the display type to envelope:
var editor = new DataTable.Editor({
ajax: '/api/data',
table: '#myTable',
display: 'envelope'
});Use a CSS selector which will trigger the use of the static display controller:
var editor = new DataTable.Editor({
ajax: '/api/data',
table: '#myTable',
display: '#myForm'
});