Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery-bootgrid how to hide column

How do I hide a column on a boot grid?

I've tried to hide the ID column like this:

<data-column-id="token" data-identifier="true" data-type="string"  visible="false">token<>
like image 349
Shash Avatar asked Mar 02 '15 19:03

Shash


2 Answers

you need to write it like this,

<data-column-id="token" data-identifier="true" data-type="string" data-visible="false">

read detail here, http://www.jquery-bootgrid.com/Documentation

like image 140
Sruit A.Suk Avatar answered Oct 11 '22 08:10

Sruit A.Suk


This will help someone in the future. Am posting as a answer by providing a link to it because sometimes we won't read the comments section.
Answer from

<style>
 {
.HideColHead
{
display: none
}
.HideCol
{
display: none
}
</style>


<th data-column-id="ID" data-header-css-class="HideColHead" data-css-class="HideCol">ID</th>
<th data-column-id="User" data-header-css-class="HideColHead" data-css-class="HideCol">User</th>

This will simply hide the column not removes from the DOM

like image 31
Aroon Avatar answered Oct 11 '22 06:10

Aroon