DataTables AJAX source example - null data source for a column

Preamble

In some tables it can be useful to not need to specify any data source for a column, as it's content is automatically generated (for example using fnRender). This is fairly common with add, edit and delete columns for a CRUD interface. You can now use the mDataProp set to null to specify that the column has no data source. DataTables will render this column as empty.

Live example

Rendering engine Browser Platform(s) Engine version CSS grade Empty!

Initialisation code

$(document).ready(function() {
	var oTable = $('#example').dataTable( {
		"bProcessing": true,
		"sAjaxSource": "sources/arrays.txt",
		"aoColumns": [
			null,
			null,
			null,
			null,
			null,
			{ "mDataProp": null }
		]
	} );
} );

Server response

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.


			
			
			

Other examples