$(document).ready(function() {
var t = [
{"id": "1", "name": "john", "type": "car"},
{"id": "2", "name": "ted0", "type": "house"},
{"id": "3", "name": "ted1", "type": "bike"},
{"id": "4", "name": "ted2", "type": "bike"},
{"id": "5", "name": "ted3", "type": "bike"},
{"id": "6", "name": "ted4", "type": "bike"},
{"id": "7", "name": "ted5", "type": "bike"},
{"id": "8", "name": "ted6", "type": "bike"},
{"id": "9", "name": "ted7", "type": "bike"},
{"id": "10", "name": "ted8", "type": "bike"},
{"id": "11", "name": "ted9", "type": "bike"},
{"id": "12", "name": "ted10", "type": "bike"},
{"id": "13", "name": "ted11", "type": "bike"},
{"id": "14", "name": "ted12", "type": "bike"},
{"id": "15", "name": "ted13", "type": "bike"},
{"id": "16", "name": "ted14", "type": "bike"},
{"id": "17", "name": "ted15", "type": "bike"},
{"id": "18", "name": "ted16", "type": "bike"},
{"id": "19", "name": "ted17", "type": "bike"},
{"id": "20", "name": "ted18", "type": "bike"},
];
//TABLE 1
var savedData = null;
$('#summaryTable').bootstrapTable({
data: t,
onSort: function(name, order) {
savedData = $('#summaryTable').bootstrapTable('getData').map(function(element, index) {
return element.id;
});
},
onPreBody: function (args) {
if (savedData != null) {
args.forEach(function(element, index) {
element.id = savedData[index];
});
savedData = null;
}
}
});
});
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.10.0/bootstrap-table.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.10.0/bootstrap-table.min.js"></script>
<div class="container">
<p>TABLE 1</p>
<table id="summaryTable" data-pagination="true">
<thead>
<tr>
<th data-field="id" data-align="center" data-width="20px" data-sortable="false">id</th>
<th data-field="name" data-align="center" data-sortable="true">Name</th>
<th data-field="type" data-align="center" data-sortable="true">type</th>
</tr>
</thead>
</table>
<br>
</div>
Вы можете использовать счетчик CSS для отображения номера строк. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters –