/home/techb158/immovalet.ca/bower_components/datatables/examples/server_side
NameSizeModeActions
scripts/-0777rm
custom_vars.html116170666editdlrm
defer_loading.html129420666editdlrm
editable.html123630666editdlrm
ids.html113920666editdlrm
jsonp.html116950666editdlrm
object_data.html118060666editdlrm
pipeline.html175000666editdlrm
post.html112260666editdlrm
row_details.html136010666editdlrm
select_rows.html124730666editdlrm
server_side.html166460666editdlrm
Edit: /home/techb158/immovalet.ca/bower_components/datatables/examples/server_side/object_data.html (11806B)
DataTables example
DataTables server-side processing example - object based data source

Preamble

The "native" data format that DataTables expects for server-side processing is a 2D array of data (rows by columns). However, this is often not flexible enough for either the server-side environment, or you might want to convey more information in the data source than is necessary to show in the table (row IDs from the database for example). For this DataTables supports the reading of data for objects as well as arrays.

In this example the server responds with an array of objects, and DataTables will look up each property that is specified by the mData property given for each column

Live example

Rendering engine Browser Platform(s) Engine version CSS grade
Loading data from server
Rendering engine Browser Platform(s) Engine version CSS grade

Initialisation code

$(document).ready(function() {
	$('#example').dataTable( {
		"bProcessing": true,
		"bServerSide": true,
		"sAjaxSource": "scripts/objects.php",
		"aoColumns": [
			{ "mData": "engine" },
			{ "mData": "browser" },
			{ "mData": "platform" },
			{ "mData": "version" },
			{ "mData": "grade" }
		]
	} );
} );

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