the column visibility option

the column visibility option

PaladinPaladin Posts: 12Questions: 4Answers: 0
edited June 2016 in Free community support

There is no clear documentation for it.

I got right now:

<table class="tablesorter" style="width:100%">
<thead>
<tr>
<th><b>Name</b></th>
<th><b>Trust level</b></th>
<th><b>BaB name(s)</b></th>
<th><b>MoneyPot name(s)</b></th>
<th><b>Bustabit Rep</b></th>
</tr>
</thead>
<tbody>
[pods name="profile" limit=-1]
<tr>
<td><a href="{@permalink}">{@uname}</a></td>
<td>{@suspicion}</td>
<td>{@bustabit_names}</td>
<td>{@moneypot_names}</td>
<td>{@bustabit_rep}</td>
</tr>
[/pods]
</tbody>
</table> 

But I want to add all the available variables to it but hide all the ones you don't see yet above by default and let them be able to toggle the visilibty for the hidden ones like they can for the ones who are already present.

So before I start adding all the other @variables I need too know how to hide them so the column won't look crappy.

I got the colvis button there but no options on it, there is nothing of info on how to make certain columns hidden by default for the toggle.


Before you mention it there is no other documented feature that helps to do this.

My site: https://cointrust.pw/

This question has an accepted answers - jump to answer

Answers

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26

    This is how you change the visibility of a column columns.visibile

    Any columns you hide are automatically detected by the colvis button in that state, and you define which columns you want to be shown when the button is clicked.

    Thanks

    Tom

  • PaladinPaladin Posts: 12Questions: 4Answers: 0
    edited June 2016

    I still don't know how to do it though. Poorly documentated.

    I added
    "columns": [
    { "visible": false },
    null,
    null,
    null,
    null
    ],

    and nothing gets hidden. :(

    also why all those null? I would like to hide the first column, hide the third and forth so only show the second column.

    Not that I really want that but with the current example code I'm nothing...

    Thank you.

  • jr42.gordonjr42.gordon Posts: 305Questions: 2Answers: 49
    Answer ✓
  • PaladinPaladin Posts: 12Questions: 4Answers: 0

    Interesting, that solved it!

This discussion has been closed.