Use API:


AJAX:

Use url, method, cache, contentType, dataType, queryParams, queryParamsType, responseHandler options to set the AJAX request and response params.


Use data-toggle="table" to activate bootstrap table without writing JavaScript.

Item ID Item Name Item Price

Transform table from an existing, unformatted html table.

Item ID Item Name Item Price
1 Item 1 $1
2 Item 2 $2
3 Item 3 $3
4 Item 4 $4
5 Item 5 $5

Use height, classes, striped, rowStyle options and class, width, cellStyle column options to set the styles of bootstrap table.

Item ID Item Name Item Price

Use align, halign and valign options to set the alignment of the columns and their header.

Item ID Item Name Item Price

Use sortName, sortOrder, sortable options, and sortable, order column options to set the basic sort of bootstrap table.

Item ID Item Name Item Price

Use sorter column option to define the custom sort of bootstrap table.

Item ID Item Name Item Price

Use formatter column option to format the display of bootstrap table column.

Item ID Item Name Item Price

Use showHeader: false to hide the header of bootstrap table.

Item Name Item Price

Use showColumns, minimumCountColumns options, and visible, switchable column options to show the columns menu list use to switch.

Name Price Columns1 Columns2 Columns3 Columns4

Bootstrap table support large columns, it will auto to show the horizontal scroll bar.

Use cardView: true option to show Card View.

Name License Description Url

Use clickToSelect, selectItemName options and radio column option to show a radio select table.

Item ID Item Name Item Price

Use clickToSelect option and checkbox column option to show a checkbox select table.

Item ID Item Name Item Price

Use checkboxHeader, checkboxEnable options and formatter column option to disabled select input.

Item ID Item Name Item Price

Use singleSelect option to allow checkbox selecting only one row..

Item ID Item Name Item Price

Use search, showColumns, showRefresh, showToggle options to show the basic toolbars.

Item ID Item ID Item Name Item Price

Use toolbar option to define the custom toolbars.

@
Item ID Item Name Item Price

Use pagination, sidePagination, pageNumber, pageSize, pageList options to set the pagination options.

Item ID Item Name Item Price

Use sidePagination: 'server' option to define the server side pagination of table.

Item ID Item Name Item Price
Here is the result of event.
Item ID Item Name Item Price

Use formatter, events column option to define the custom events.

Item ID Item Name Item Price Item Operate

The calling method syntax: $('#table').bootstrapTable('method', parameter);.

Item ID Item Name Item Price

JSFiddle Examples