cells().edit()
Edit cells with bubble editing.
Please note - this property requires the Editor extension for DataTables.
Description
This method can be used to edit a single cell using Editor's bubble editing modes. It is essentially a proxy for the bubble()
method, exposed through the DataTables API object with the cells()
selector being used to conveniently select the cells to be edited.
Note that due to Editor's multi-row editing the cells to be edited can be on separate rows.
The Editor instance used by this method is the last Editor instance create that refers to this table when the table was constructed. This consideration is only important when using multiple Editor instances!
Please note that this method only exposes one small part of Editor through the DataTables API. Editor has its own extensive API which provides complete control over the form.
Type
function cells().edit( options )
- Description:
Edit a cell using the bubble editing methods of Editor.
- Parameters:
Name Type Optional 1 options
No Form configuration options, including the ability to set the title, buttons and behaviour of the form.
- Returns:
The original API instance, unmodified, is returned to allow chaining.
Examples
Edit all cells with the class selected
:
var myTable = new DataTable('#myTable');
myTable.cells('.selected').edit();
Bubble edit all cells in column index 3:
var myTable = new DataTable('#myTable');
myTable.cells(null, 3).edit();
Edit three columns in a bubble edit and submit immediately when blurred:
var myTable = new DataTable('#myTable');
$('#myTable').on('click', 'tbody td.edit', function () {
myTable.cells(this, [2, 3, 4]).edit({
blur: 'submit'
});
});
Related
The following options are directly related and may also be useful in your application development.