Since: DataTables 1.10

Make newly defined child rows visible.


This method can be used to make the child rows of a parent row visible at any time. Child rows can be attached using row().child() but do not have to be made immediately visible. This method provides the option of making those child rows which have already been attached visible.

Please note that this method is only available when row().child() is called with a parameter set. This is because row().child() will return the child rows if called with no parameters, which is either a jQuery object or undefined. When called with a parameter row().child() returns a DataTables.Api instance. If you need to display a child row without any parameters being set use row().child.show().

Unlike many of the other methods which manipulate the DataTable, this method does not require draw() to be called for the resulting change to be displayed. The child row(s) are inserted into the table without requiring that DataTables redraw.


function row().child().show()


Show the child row(s) of a parent row


DataTables API instance.


Show / hide a row based on its current state, adding the row content as needed.:

var table = new DataTable('#myTable');

$('#example tbody').on('click', 'td.details-control', function () {
	var tr = $(this).parents('tr');
	var row = table.row(tr);

	if (row.child.isShown()) {
		// This row is already open - close it
	else {
		// Open this row (the format() function would return the data to be shown)