{hero}

columns.searchPanes.viewCount

自 SearchPanes 1.3.0 起

隐藏特定列的面板中的计数列。
请注意,此属性需要 DataTables 的 SearchPanes 扩展。

说明

标准情况下,SearchPanes 将会显示包括计数列在内的表格。但是,如果 columns.searchPanes.viewCount 的值为 false,则不会显示计数列。

可以通过使用 searchPanes.viewCount 隐藏所有面板中的计数列。

此选项替换了版本 1.2.1+ 中弃用的 columns.searchPanes.hideCount。替换目的是为了与 searchPanes.viewTotal 保持一致。

类型

布尔值

说明

columns.searchPanes.viewCount 设置为 false 后,特定列的面板中的计数列将被隐藏。

默认值

  • 值:true

columns.searchPanes.viewCount 参数的默认值为 true,表示标准情况下面板中将包括计数列。

示例

隐藏第 5 列的面板的计数

1
2
3
4
5
6
7
8
9
10
11
12
13
new DataTable('#myTable', {
    layout: {
        top1: 'searchPanes'
    },
    columnDefs: [
        {
            searchPanes: {
                viewCount: false
            },
            targets: [4]
        }
    ]
});

相关

以下选项直接相关,在您的应用程序开发中可能也有用。

Comments (0)

No comments posted for this page yet. Be the first to contribute!

Post new comment

Contributions in the form of tips, code snippets and suggestions for the above material are very welcome. To post a comment, please use the form below. Text is formatted by Markdown.

To post comments, please sign in to your DataTables account, or register:

Any questions posted here will be deleted without being published.
Please post questions in the Forums. Comments are moderated.