Unable to refresh the datatable cache -
Unable to refresh the datatable cache -
puneet.jayee
Posts: 18Questions: 8Answers: 0
I tried to use the invalidate function of the data table but unable to refresh the cache.
Scenario
I have a input text box in one of the column of the data table and when user input some value and click of export csv. The recently input value does not get exported. Please help!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
It would help if you could post a link to a page showing the issue. However I built this example previously and it may help you:
http://live.datatables.net/zukacehi/1/edit
Kevin
Thanks a lot Kevin. Indeed that worked.
Awesome....:)
In a similar line - I would like to understand - How to update the data table cache, when we dynamically add or delete the row from the table.
Do you have code snippet which shows - Datatable cache updated while we remove or add any row dynamically to the table?
Are you using the API (
row.add()
,row().remove()
)?If so then you probably just need to add
draw()
to the line, take a look at the examples in the above links.If not using the API, you should if you can, then may
row().invalidate()
with the proper row selector for the new row. Probably will need to userows().invalidate()
to invalidate the table when deleting.Kevin
Hello Kevin,
Thanks. I tried to use the Row().Invalidate to refresh the data table cache but I was unable to do so. For your information - I am not using row.add or row.remove in my implementation.
Do you have any code snippet or sample work which I can refer for updating the data table cache for dynamically adding and deleting the rows?
Again for your information - I am not using row.add or row.remove in my implementation.
Please post an example of what you are doing and we can help.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin