fndraw在数据表不工作 [英] fndraw on datatables not working

查看:164
本文介绍了fndraw在数据表不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用数据表插件,并希望通过点击按钮重新加载表列的排序。我正在更改桌面客户端的内容。但是当我点击redrawBtn时,没有任何反应。一切都正常工作。

I'm using the datatables plugin and want to reload the sorting of the table columns by the click of a button. I'm changing the content of the table clientside. But nothing happens when I click redrawBtn. Everything else is working properly.

// datatable config
var oTable = tablesorterEl.dataTable({
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"bRetrieve": false,
"asSorting": true,
"bServerSide": false,
"bSearchable": true,
"aaSorting": [],                    
"oLanguage": {
"sSearch": ""
},
"bStateSave": true
});

// redraw button
$('.redrawBtn').click(function(){

  oTable.fnDraw();
});


推荐答案

如果你想fnDraw重新排序dataTable,你应该写oTable.fnDraw(true)。

if you want fnDraw to re-sort dataTable you should write oTable.fnDraw(true).

pietro

这篇关于fndraw在数据表不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆