{hero}

removeSingle

Since: Editor 1.6.0

A button that will delete a single row using Editor.
Please note - this property requires the Editor extension for DataTables.

Description

This button provides the same functionality and options as the remove with the sole exception that it is enabled only when a single row is selected in the table. Unlike remove if multiple rows are selected this button type will be shown as disabled (see also `-button selectedSingle).

This can be useful if your data processing scripts that accept the data to delete do not support multi-row deletion or you wish to limit the number of records that can be deleted by a user at a single time to one.

For full documentation of the options that this button presents, please refer to the remove reference documentation.

Examples

A single, simple remove button for the Editor instance myEditor:

$('#myTable').DataTable( {
	buttons: [
		{
			extend: 'removeSingle',
			editor: myEditor
		}
	]
} );

Create, edit and remove buttons, all with default options:

$('#myTable').DataTable( {
	buttons: [
		{ extend: 'create',       editor: myEditor },
		{ extend: 'editSingle',   editor: myEditor },
		{ extend: 'removeSingle', editor: myEditor }
	]
} );