Код: Выделить всё
datatable = $("#datatable").DataTable({
data : myData,
moreoptions : moreoptions
});
Вот что я пробовал:
Код: Выделить всё
$('#upload-new-data').on('click', function () {
myData = NewlyCreatedData; // I console logged this NewlyCreatedData, and it has my uploaded data.
datatable.draw(); // Redraw the DataTable
});
Код: Выделить всё
datatable = $("#datatable").DataTable({
"data" : myData,
"drawCallback" : function () {
myData = NewlyCreatedData;
},
"moreoptions" : moreoptions,
});
Код: Выделить всё
$('#upload-new-data').on('click', function () {
datatable.draw(); // Redraw the DataTable
});
Подробнее здесь: https://stackoverflow.com/questions/259 ... h-new-data
Мобильная версия