私はここから延長ブートストラップテーブルコードを使用して派手なテーブルを作成しようとしている: https://github.com/wenzhixin/bootstrap-tableBootstraptableは、インタラクティブなテーブルを作っていない
はそれは非常に人気のあるプロジェクトだが、テーブルにはどのような方法で、インタラクティブではありませんなぜか分からない。 何奇妙なことはbootstraptable Jsのは、HTMLテーブルにデータを置くことである:
$(function() {
$('#datatable').bootstrapTable({
striped: true,
pagination: true,
showColumns: true,
showToggle: true,
showExport: true,
sortable: true,
paginationVAlign: 'both',
pageSize: 25,
pageList: [10, 25, 50, 100, 'ALL'],
columns: [{'field': 'Name', 'title': 'Name'}, {'field': 'Age', 'title': 'Age'}], // here is where we use the column content from our Django View
data: [{"Name":"Alex","Age":10},{"Name":"Bob","Age":12},{"Name":"Clarke","Age":13}] // here is where we use the data content from our Django View. we escape the content with the safe tag so the raw JSON isn't shown.
});
});
ので、テーブルがHTMLで生産されているという事実がbootstrapTableコードが実行されていることを意味する必要があります。しかし、派手な機能(ページ区切り、並べ替え)のどれも動作しません。
の作業例: https://jsfiddle.net/wouterr5/b4huLLt8/1/