简体   繁体   English

使用jquery.dataTables.js 1.10.11,该表最初不会显示对表的添加

[英]Using jquery.dataTables.js 1.10.11, the table doesn't initially show additions to tables

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. 我正在使用“ jquery.dataTables.js” 1.10.11。( https://cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js )问题是当我添加另一个值(用户名)时在这种情况下,在我的表上,底部显示用户名数量的数字不会更改以显示添加的内容。 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 . 使用t.row.add可增加计数器,如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();

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 分页不适用于DataTables 1.10.7 / 1.10.11 - Pagination doesn't work with DataTables 1.10.7 / 1.10.11 将JSON字符串转换为JSON对象,因此无需在基本jquery.dataTables.js中进行更改 - Convert JSON string to JSON object so I don't need to change in the base jquery.dataTables.js jquery.dataTables.js:无法使用 Svelte 读取未定义的属性 - jquery.dataTables.js: Cannot read properties of undefined with Svelte 获取错误:未捕获的语法错误:jquery-ui.js和jquery.dataTables.js中出现意外的令牌&lt; - Getting Error : Uncaught SyntaxError: Unexpected token < in jquery-ui.js and jquery.dataTables.js 如何在具有文件jquery.dataTables.js的jquery插件的同一列中对日期和字符串进行排序? - How to sort date and string in same column in jquery plugin having file jquery.dataTables.js? 最初加载 jQuery DataTables 重复项 - jQuery DataTables duplicates are initially loading 当数据表中没有数据(初始和搜索后)时如何显示自定义表行()| 数据表 | jQuery - How to show custom table row(<tr>) when there is no data(initial and after searching) in data-tables | datatables | jQuery 如果最初未设置显示属性,则jQuery切换无法正常工作 - jQuery toggle doesn't work properly if no display property set initially <span>最初不存在的</span>JQuery 选择元素 - JQuery select elements in <span> that doesn't exist initially 将id属性设置为datatables 1.10.11 <tr> - Setting id attribute to datatables 1.10.11 <tr>
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM