I am using "jquery.dataTables.js" 1.10.11.( https://cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js ) The problem is when I add another value, User Name in this case, on my tables the number on the bottom showing number of User Names does not change to show the addition. I have to reload the page in order to see the new number. I need it to automatically load the new number right when the new value is added to the table, not after it reloads. Has anyone used this datatable, and have a solution to this problem?
Using t.row.add increments the counter as shown on https://datatables.net/examples/api/add_row.html .
oTable.row.add( [
'Lock',
'Password',
'Comment',
'Groups',
'Roles'
] ).draw();
if your table is serverside based you should use
oTable.fnDraw();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.