1

我尝试在Bootgrid Command Buttons上练习示例,但是在将序列号放在第一列时遇到了麻烦。请帮我。谢谢你。

<table id="bootgrid" class="table table-bordered">
<thead>
    <tr>
        <th>Number ?? </th>
        <th data-column-id="barcode" data-type="numeric">Barcode</th>
        <th data-column-id="name_equipment">Name Eqp</th>
        <th data-column-id="commands" data-formatter="commands" data-sortable="false">Action</th>
    </tr>
</thead>   

<script type="text/javascript">
var grid = $("#bootgrid").bootgrid({
    ajax: true,
    post: function ()
    {
        return {
            id: "b0df282a-0d67-40e5-8558-c9e93b7befed"
        };
    },
    url: "response.php",
    formatters: {
        "commands": function (column, row)
        {
            return "<a href=\"edit&code=" + row.barcode + "\" class=\"btn btn-xs btn-warning\"><span class=\"glyphicon glyphicon-pencil\"></span></a> ";
        }
    }
}).on("loaded.rs.jquery.bootgrid", function () {});
$("#clearSearch").on("click", function ()
{
    $("#bootgrid").bootgrid("search");
});

4

0 回答 0