Add new row
Add new row
I am aiming to build Electron like Eel application with Python and for DataTable I tried to use the simple HTML datasource when the source is embedded in the html code as table rows. I had the example sample code with data and I tried to replace the html code with innerHTML by replacing the content.
The data loaded successfully, however the pagination and other functions are not working and pagination reads the same amount of data as it was in the initial HTML code.
Is there any function to load the data after code changing with innerHTML?
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Answers
Sounds like you might be initializing Datatbles then updating the HTML table directly. If so please see this FAQ. If this doesn't help then please provide more details of exactly what you are doing. Maybe post the relevant Javascript code. Take a look at the Data docs for details of how to apply the table data to Datatables.
Kevin
This is exactly what happened.
Can you suggest a method, how to read data dynamicly? I can produce data files that Ajax would read continously. Do I need extra code for that?
In the meantime I found the refresh; ajax.reload method that works.
https://datatables.net/reference/api/ajax.reload()
Thanks,