Changing Data Keys after init
Changing Data Keys after init
![niftybytes](https://secure.gravatar.com/avatar/888958c32f7afc403c026c127b8090f6/?default=https%3A%2F%2Fvanillicon.com%2F888958c32f7afc403c026c127b8090f6_200.png&rating=g&size=120)
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