JQuery datatable.net(datatable.js) - 动态更改设置 [英] JQuery datatable.net (datatable.js) - Dynamically Change Settings

查看:1136
本文介绍了JQuery datatable.net(datatable.js) - 动态更改设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JQuery DataTable,我想动态地更改设置(理想情况下 必须删除/重新创建表)。有办法重新绑定桌子还是不可能的?



我提供了一个现场演示。我写了

  oTable.fnSettings()._ iDisplayLength = 100; 
oTable.fnDraw(false);

也许您需要查看所有设置才能查找您的财产。


I am using JQuery DataTable and I want to dynamically change the settings (ideally WITHOUT having to delete/recreate the table). Is there a way to rebind the table or is that not possible?

I have provided a live demo HERE.

In my current example, I only want to change the sPaginationType setting. My goal is to do the following:


BEFORE



AFTER

Can anyone help?

解决方案

I wanted to change iDisplayLength and found the answer here. I wrote

oTable.fnSettings()._iDisplayLength = 100;
oTable.fnDraw(false);

Maybe you'll have to look through all settings to find your property.

这篇关于JQuery datatable.net(datatable.js) - 动态更改设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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