How to redraw DataTable with new data

前端 未结 7 468
感动是毒
感动是毒 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:59

    The following worked really well for me. I needed to redraw the datatable with a different subset of the data based on a parameter.

    table.ajax.url('NewDataUrl?parameter=' + param).load();
    

    If your data is static, then use this:

    table.ajax.url('NewDataUrl').load();
    

提交回复
热议问题