Changing Data Keys after init
Changing Data Keys after init
niftybytes
Posts: 4Questions: 2Answers: 0
I have search to find a solution but I guess I'm not searching for the right thing.
$('#example').DataTable( {
data: data,
columns: [
{ data: 'name' },
{ data: 'position' },
{ data: 'salary' },
{ data: 'office' }
]
} );
I am attempting to change the data
keys after I create the DataTable. If it helps I am currently using
oTable.fnClearTable();
oTable.fnAddData(this.get("controller.currentTableData"));
to push new data into the table but the keys have changed with the new data.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Currently no - there is no option to change the data property after initialisation. You would need to destroy the table and create a new one with the new options.
Allan