rowInvalidate
Since: DataTables 3.0
Triggered when the data in a row is updated.
Description
It can be useful to know if the data in a row has been updated. You might wish to know this if some other component needs to be updated, or events changed. This event provides exactly that ability.
Type
function( e, settings, rowIndex, colIndex )
Parameters:
| Name | Type | Optional | |
|---|---|---|---|
| 1 | e | No | |
Event object | |||
| 2 | settings | No | |
DataTables settings object | |||
| 3 | rowIndex | No | |
The data index for the row that was updated (for use with | |||
| 4 | colIndex | No | |
Column index, if it was the data in a specific column that was updated (e.g. using | |||
Example
Record a message whenever data in a row is updated:
let table = new DataTable('#myTable');
table.on('rowInvalidate', function (e, settings, rowIndex) {
console.log('Row data updated for row index', rowIndex);
});
table.cell(0, 0).data('My new data').draw();