Home > front end >  The bootstrap - table if too many columns; Default want to hide some, and can be controlled through
The bootstrap - table if too many columns; Default want to hide some, and can be controlled through

Time:12-13

How that is now in the default column showColumns control part is not checked?
Hidecolumn seems short..

CodePudding user response:

I also went to the same problem, wait for a great god answers,

CodePudding user response:

Recently met a problem, found hidden paging support in IE8 unfriendly, line was compressed into a , please answer

CodePudding user response:

Did you the idea implementation with the request

CodePudding user response:

The original poster to solve, for help

CodePudding user response:

$(function () {
//initialize the table
LoadingDataListOrderRealItems ();
//hide the column of
$(' # tableOrderRealItems). BootstrapTable (' showColumn ', 'ShopName);
$(' # tableOrderRealItems). BootstrapTable (' hideColumn ', 'GoodsId);
$(' # tableOrderRealItems). BootstrapTable (' hideColumn ', 'OrderItemId');
$(' # tableOrderRealItems). BootstrapTable (' hideColumn ', 'ShopName);
$(' # tableOrderRealItems). BootstrapTable (' hideColumn ', 'SellerName');
});

CodePudding user response:

Data - visible="false"

CodePudding user response:

Was also very troubled, saw the bootstrap - table documents, has been solved, registered an account specifically to answer
Corresponding div HTML inside is very simple, add data - can be switchable="false"
If set in js, add switchable to the corresponding properties of field: false can
Js sample (year wouldn't be in the default column showColumns control) :
The columns: [

{the checkbox: true},
{field: 'year' title: __ (' year '), switchable: false},

CodePudding user response:

Especially on the visible: false can be hidden by default

CodePudding user response:

The columns: [
{
Title: 'number',
Align: 'center',
Valign: 'middle',
The formatter: function operator (the value, the row, the index) {
Return (index + 1) + (page 1) * rows
}
},
{
Field: 'name',
Title: 'name',
Align: 'center',
Valign: 'middle',
Sortable: false,//field sorting, false don't sort, true sort
Visible: the default true or false//checked, false in the top right corner of the check list, do not check the
},
  • Related