How to redraw DataTable with new data

前端 未结 7 457
感动是毒
感动是毒 2020-12-13 08:45

I have checked several questions already about this topic here in stackoverflow, but they are all using the old dataTable. I am using DataTable. I populated my DataTable by

7条回答
  •  醉酒成梦
    2020-12-13 08:54

    datatable.rows().iterator('row', function ( context, index ) {
        var data = this.row(index).data();
        var row = $(this.row(index).node());
        data[0] = 'new data';
        datatable.row(row).data(data).draw();
    });
    

提交回复
热议问题