从JQuery bootgrid中删除行时遇到问题

时间:2020-04-08 19:41:08

标签: javascript jquery jquery-bootgrid

我正在加载表格的静态数据和html

<table id="grid-filterFields" class="table table-condensed table-hover table-striped" style="table-layout:auto">
                <thead id="grid-thead">
                    <tr>

                        <th data-column-id="id" data-identifier="true" data-type="numeric" ></th>
                        <th data-column-id="filterType">FilterType</th>
                        <th data-column-id="filterCondition">FilterCondition</th>
                        <th data-column-id="filterText">FilterBy</th>
                        <th data-column-id="filterClause">ADD/OR</th>

                    </tr>

                </thead>
                <tbody>

                </tbody>
            </table>

向bootgrid添加行之后,我想从网格中删除行。

我试图使用

获取行
var rows=$("#grid-filterFields").bootgrid("getCurrentRows");

这给了我Json数据数组。 我想删除特定的行,请让我知道我该怎么做。 我尝试过这种方法,但是没有运气

var removedrows = [];
 removedrows[0] = parseInt(2);//to remove 2 row in bootgrid

$("#grid-filterFields").bootgrid("remove", removedrows);

0 个答案:

没有答案
相关问题