数据表上的fndraw无法正常工作

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

// 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)。

彼得罗

我发现我必须使用dataTables函数来操作dom。 喜欢

 $('.redrawBtn').click(function(){ oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell. Will redraw by default });