Inserting data dynamically
Inserting data dynamically
markusslima
Posts: 1Questions: 0Answers: 0
jsvar table = $('#table').dataTables({
"columns": [
{"title": "Col 1", "width": "80%"},
{"title": "Col 2", "width": "20%"},
]
});
$('#btnAddData').click(function () {
var arr = [
[1, 2],
[2, 3]
];
table._fnClearTable();
table._fnAddData(arr);
table._fnReDraw(); // or table._fnDraw();
});
Dont Work
This discussion has been closed.
Replies
Why are you calling the private API methods rather than the public API? If you are going to use the legacy API it is documented here, but you would be best served using the new API in 1.10.
Allan