javascript - How to put sequence number in first column in bootgrid table with php server side -
i tried practice examples on bootgrid command buttons, having trouble when putting sequence number in first column. please me. thank you.
<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"); });
Comments
Post a Comment