【问题标题】:Are there limitations to the number of rows in bootstrap or html tables?bootstrap 或 html 表中的行数是否有限制?
【发布时间】:2017-07-01 22:37:01
【问题描述】:

我有一个 html 表格,它切断了第 200 行之后的所有行。这些行实际上就在那里,因为如果我搜索它,list.js javascript 搜索功能会在其中找到数据,但是当表加载时它们不会显示。

这是引导程序或其他 html 内容中的限制或设置吗?

更新 - 这是表格的简化版本。 此外,我在此页面上使用的与表格交互的 javascript 库是 list.js 和 treetable.js。

我会注意到我在我开发的另一个应用程序上看到了这个问题,但 99% 的情况下这不是问题,因此从未解决。在这个有问题的应用程序上,它几乎总是一个问题。

 <div class="table">
   <div class="table-responsive" id="table3div">
     <table class="table table-hover table-condensed tablesorter" id="table3">
        <thead>
            <tr>
                <th>
                    <div class="checkbox custom-control custom-checkbox">
                        <label>
                            <input type="checkbox" id="checkAlltable3" />
                            <span class="custom-control-indicator"></span>
                        </label>
                    </div>
                </th>
                <th class="header">Description</th>
                <th class="header">Status</th>
                <th class="header">Associated With</th>
                <th class="header">Assigned To</th>
                <th class="header">ID</th>
                <th class="header">Type</th>
                <th class="header headerSortDown">Due Date</th>
            </tr>
        </thead>
        <tbody class="list">

            @for (int i = 0; i < Model.IssuesAndNotes.Count; i++)
            {
                <tr>
                    <td>
                        <div class="checkbox custom-control custom-checkbox">
                            <input id="checkBox" type="checkbox">
                        </div>
                    </td>
                    <td class="description">
                        Some data
                    </td>             
                    <td class="status">
                        Some data
                    </td>
                    <td class="association">
                        Some data
                    </td>
                    <td class="assignedTo">
                        Some data
                    </td>
                    <td class="issueId">
                        Some data
                    </td>
                    <td class="type">
                        Some data
                    </td>
                    <td class="date">
                        Some data
                    </td>
                </tr>  
            }                                           
        </tbody>
    </table>
</div>

【问题讨论】:

  • Bootstrap 只是在布局您的内容...我不明白为什么会有这种限制。您能否提供一个带有 sn-p 代码或 jsfiddle 代码的工作示例?谢谢
  • @Kiwad 更新了简化版的表格

标签: html asp.net-mvc twitter-bootstrap


【解决方案1】:

list.js中默认限制为200,可以在参数https://github.com/javve/list.js#parameters中修改限制

有关说明,请查看页面选项http://listjs.com/api/ 上的 API 文档

【讨论】:

  • 太好了,谢谢。找到参数了,在初始化函数里面叫self.page
猜你喜欢
  • 1970-01-01
  • 2013-05-21
  • 2021-01-18
  • 2017-04-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-06-03
相关资源
最近更新 更多