cells().edit()

Since: Editor 1.5.0

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:
Returns:

The original API instance, unmodified, is returned to allow chaining.

Examples

Edit all cells with the class selected:

var myTable = $('#myTable').DataTable();

myTable.cells( '.selected' ).edit();

Bubble edit all cells in column index 3:

var myTable = $('#myTable').DataTable();

myTable.cells( null, 3 ).edit();

Edit three columns in a bubble edit and submit immediately when blurred:

var myTable = $('#myTable').DataTable();

$('#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.