1

我是 bootgrid 和 jquery 或 ajax 的新手。我找到了一个很好的表格(bootgrid)插件,但我仍然无法理解里面的一些代码。
现在我想在顶部和右侧的下拉列表中编辑一些东西,下拉列表将显示该th值,当您单击该值时,该值的整行将被隐藏。
我只想让它们中的一个值被禁用。我不希望用户隐藏“命令”,因为它行显示按钮。代码在这里形成:Bootgrid

我想做

4

1 回答 1

3

这很简单。假设您有这个HTML代表您的引导网格:

<table id="grid-basic" class="table table-hover table-striped">
    <thead>
        <tr>
            <th data-column-id="ticket-id" data-type="numeric" data-identifier="true">TICKET ID</th>
            <th data-column-id="submission-date">SUBMISSION DATE</th>
            <th data-column-id="status">STATUS</th>
            <th data-column-id="ownership">OWNERSHIP</th>
            <th data-column-id="applicant-name">APPLICANT NAME</th>
            <th data-column-id="applicant-ic">APPLICANT IC</th>
            <th data-column-id="order-type">ORDER TYPE</th>
            <th data-column-id="package">PACKAGE</th>
            <th data-column-id="commands" data-formatter="commands">Commands</th>
        </tr>
    </thead>
    <tbody>
      <!-- data via javascript -->
    </tbody>
</table>

您只需要添加data-visible-in-selection="false"到您不想在该下拉菜单中显示的列:

<th data-column-id="commands" data-visible-in-selection="false" data-formatter="commands">Commands</th>
于 2017-05-26T01:37:31.590 回答