how to display dynamic data to datatable from javascript?
how to display dynamic data to datatable from javascript?
Basavarajsk
Posts: 1Questions: 1Answers: 0
I have a simple HTML table with data coming from javascript Publisher as JSON data set continuously (updating existing rows and adding new rows directly in the tr/td elements in the table)
After setting up the table element as datatable the first time, what api I should use to refresh the datatable on the screen to show the new data set everytime I got new data updates from Publisher?
This discussion has been closed.
Answers
If the updates are per row, then use
row.add()
,row().data()
androw().remove()
.If the update contains the full data set for the table use
clear()
androws.add()
.Allan