+ 2

How to refresh jQuery datatable grid refresh on add/delete of record ?

29th Mar 2018, 5:52 PM
Muhafil Saiyed
Muhafil Saiyed - avatar
2 odpowiedzi
+ 2
When you add/delete a record, you'll want to redraw the table. This should refresh the table with the new information for you. $('#myTableID').DataTable().columns.adjust().draw(); ^That should do the trick for you. I actually ran into this issue the other day and that's how I resolved it. Note: This is based on DataTables 1.10. If you're using older version of DataTables, I can't testify if it'll work or not. Good luck!
29th Mar 2018, 6:30 PM
Fata1 Err0r
Fata1 Err0r - avatar
0
yes , thanks and also I tried destroy and set html("") blank of datatable before re intialize
30th Mar 2018, 6:27 PM
Muhafil Saiyed
Muhafil Saiyed - avatar