<?xml version="1.0" encoding="UTF-8" ?>
<dt-api group="rows">
	<name>rows.add()</name>
	<summary>Add multiple new rows to the table.</summary>
	<since>1.10</since>

	<type type="function">
		<signature>rows.add( data )</signature>
		<description>Add new rows to the table using the data given</description>
		<description>Select a row found by a row selector</description>
		<parameter type="array" name="data">
			Array of data elements, with each one describing a new row to be added to the table (i.e. `data.length` is the number of new rows that will be added to the table). Each data element may be an array, object, Javascript object instance or a `-tag tr` element. The data structure given must be in the same format as the other data in the table (i.e. if your table uses objects, pass in an object here!).
		</parameter>
		<returns type="DataTables.Api">DataTables API instance with the newly added rows in its result set.</returns>
	</type>

	<description>
		Adding new data to a table is central to the concept of being able to dynamically control the content of a DataTable, and this method provides the ability to do exactly that, adding multiple new rows at a time. If you wish to add only a single row at a time, this method's singular counterpart, `dt-api row.add()` can be used.

		The rows that are added are subjected to the ordering and search criteria that are applied to the table, which will determine the new row's position and visibility in the table.

		This method will add the data to the table internally, but does not visually update the tables display to account for this new data. In order to have the table's display updated, use the `dt-api draw()` method, which can be called simply as a chained method of the `dt-api row.add()` method's returned object - for example `table.row.add( [ 1, 2, 3, 4 ] ).draw();`. This is done to allow easy optimisation of the table where multiple rows can be added before the table is redrawn.
	</description>

	<example title="Add two new rows to the table and redraw"><![CDATA[
var table = $('#example').DataTable();

table.rows.add( [ {
		"name":       "Tiger Nixon",
		"position":   "System Architect",
		"salary":     "$3,120",
		"start_date": "2011/04/25",
		"office":     "Edinburgh",
		"extn":       "5421"
    }, {
		"name": "Garrett Winters",
		"position": "Director",
		"salary": "$5,300",
		"start_date": "2011/07/25",
		"office": "Edinburgh",
		"extn": "8422"
	} ] )
	.draw();
]]></example>

	<example title="Add multiple new instances of an object to a table and then add a class to those newly added rows"><![CDATA[
var table = $('#example').DataTable();

table
	.rows.add( [
		new Pupil( 43 ),
		new Pupil( 67 ),
		new Pupil( 102 )
	] )
	.draw()
	.nodes()
	.to$()
	.addClass( 'new' );

]]></example>

	<related type="api">row.add()</related>
</dt-api>
