search
HomeWeb Front-endBootstrap Tutorialbootstraptable method to hide columns

How to hide columns in bootstraptable: 1. Hide through "bootstrapTable('hideColumn', 'GoodsId');"; 2. Hide through the attribute "visible: false".

bootstraptable method to hide columns

# Recommended: "

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();
            $(&#39;#tableOrderRealItems&#39;).bootstrapTable(&#39;showColumn&#39;, &#39;ShopName&#39;);
            $(&#39;#tableOrderRealItems&#39;).bootstrapTable(&#39;hideColumn&#39;, &#39;GoodsId&#39;);
        }); 
 
    </script>

Second way:

Hide: visible: false,

Show: visible: true,

The visible attribute does not have true or false, it is visible, invisible and gone.

visible: visible;
invisible: invisible, but takes up space;
gone: invisible, does not take up space, the control disappears from the layout.

columns:[
	{
	 	title: &#39;id&#39;,
		field: &#39;id&#39;,
		 align: &#39;center&#39;,
		valign: &#39;middle&#39;,
		 width: &#39;7%&#39;,
		 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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do I stay up-to-date with the latest Bootstrap releases and updates?How do I stay up-to-date with the latest Bootstrap releases and updates?Mar 14, 2025 pm 07:40 PM

The article discusses strategies for staying updated with Bootstrap releases, accessing official documentation, best practices for integration, and community resources for discussion.

How do I customize the appearance and behavior of Bootstrap's components?How do I customize the appearance and behavior of Bootstrap's components?Mar 18, 2025 pm 01:06 PM

Article discusses customizing Bootstrap's appearance and behavior using CSS variables, Sass, custom CSS, JavaScript, and component modifications. It also covers best practices for modifying styles and ensuring responsiveness across devices.

What are the key components of the Bootstrap framework (grid system, typography, components, utilities)?What are the key components of the Bootstrap framework (grid system, typography, components, utilities)?Mar 14, 2025 pm 07:42 PM

Article discusses key Bootstrap components: grid system, typography, components, and utilities. Focuses on enhancing responsive design and interactive UI creation.

How do I override Bootstrap's styles without modifying the core framework files?How do I override Bootstrap's styles without modifying the core framework files?Mar 14, 2025 pm 07:44 PM

The article discusses methods to override Bootstrap's styles using custom CSS, focusing on creating separate files, using specificity, and best practices for organization.

How do I use Bootstrap's grid system to create responsive layouts for different screen sizes?How do I use Bootstrap's grid system to create responsive layouts for different screen sizes?Mar 14, 2025 pm 07:43 PM

Article discusses using Bootstrap's grid system for responsive layouts across devices, detailing structure, customization, and testing tools.

How do I contribute to the Bootstrap community?How do I contribute to the Bootstrap community?Mar 14, 2025 pm 07:38 PM

The article outlines ways to contribute to Bootstrap, including code submissions, documentation improvements, bug reporting, and community engagement. It provides detailed steps for submitting pull requests and reporting issues.

Can I use inline-block in the Bootstrap picture centered?Can I use inline-block in the Bootstrap picture centered?Mar 04, 2025 pm 03:06 PM

This article examines the effectiveness of using inline-block for centering images within Bootstrap. It argues that while technically feasible, this method is impractical due to complexities in achieving responsive vertical centering and maintenance

Where can I find Bootstrap templates and themes?Where can I find Bootstrap templates and themes?Mar 14, 2025 pm 07:39 PM

The article discusses sources for Bootstrap templates and themes, both free and premium. It covers customization and lists reputable sites for downloads.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)