Bootstrap如何隐藏table中的某一列?下面本篇文章给大家介绍一下。有一定的参考价值,有需要的朋友可以参考一下,希望对大家有所帮助。
Bootstrap隐藏table中的某一列
1、利用bootstrapTable来设置要隐藏和显示的列$(function () {
//初始化table
LoadingDataListOrderRealItems();
//隐藏列
$('#tableOrderRealItems').bootstrapTable('showColumn', 'ShopName');
$('#tableOrderRealItems').bootstrapTable('hideColumn', 'GoodsId');
$('#tableOrderRealItems').bootstrapTable('hideColumn', 'OrderItemId');
$('#tableOrderRealItems').bootstrapTable('hideColumn', 'ShopName');
$('#tableOrderRealItems').bootstrapTable('hideColumn', 'SellerName');
});
bootstrap-table是一个基于Bootstrap的jQuery插件,可以实现从数据库中提取数据到前端进行相应操作的功能,很好用!!
2、直接使用hidden属性来设置columns: [{
field: 'OrderId',
title: '#',
align: 'center',
}, {
field: 'OrderItemId',
title: 'OrderItemId',
align: 'left',
hidden:true,
}, {
field: 'GoodsId',
title: 'GoodsId',
align: 'left',
hidden:true,
}, {
field: 'OrderCode',
title: '订单编号',
align: 'left',
}]
更多bootstrap的相关知识,可访问:前端开发学习!!
更多推荐
bootstraptable 列隐藏_bootstrap中table如何隐藏列?
发布评论