# Recommended: "How to hide columns in bootstraptable: 1. Hide through "bootstrapTable('hideColumn', 'GoodsId');"; 2. Hide through the attribute "visible: false".
bootstrap video tutorial》
The operating environment of this tutorial: Windows 10 system, bootstrap version 3.0. This method is suitable for all brands of computers.How to hide columns in bootstraptable:
hidden: true in bootstrapTable doesn’t work! The code on the Internet is this $(table).bootstrapTable('showColumn', 'Field to be hidden')First way<script type="text/javascript"> $(function () { LoadingDataListOrderRealItems(); $('#tableOrderRealItems').bootstrapTable('showColumn', 'ShopName'); $('#tableOrderRealItems').bootstrapTable('hideColumn', 'GoodsId'); }); </script>
visible: visible;
invisible: invisible, but takes up space;
gone: invisible, does not take up space, the control disappears from the layout.
columns:[ { title: 'id', field: 'id', align: 'center', valign: 'middle', width: '7%', visible: false }]
The above is the detailed content of bootstraptable method to hide columns. For more information, please follow other related articles on the PHP Chinese website!