jquery datatables隐藏列 [英] jquery datatables hide column

查看:382
本文介绍了jquery datatables隐藏列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想到了如何重新加载表数据:使用 fnClearTable fnAddData



但我的问题是在一个我的观点(例如隐藏模式)我不想显示某些列。

解决方案

你可以隐藏这个命令的列:

  fnSetColumnVis(1,false); 

其中第一个参数是列索引,第二个参数是可见性。



Via: http://www.datatables.net/api - 功能 fnSetColumnVis


Is there a way with the jquery datatables plugin to hide (and show) a table column?

I figured out how to reload the table data: using fnClearTable and fnAddData.

But my issue is that in one of my views for the table (e.g. a hidden mode) I don't want to show certain columns.

解决方案

You can hide columns by this command:

fnSetColumnVis( 1, false );

Where first parameter is index of column and second parameter is visibility.

Via: http://www.datatables.net/api - function fnSetColumnVis

这篇关于jquery datatables隐藏列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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