Search code examples
javascriptjquery-uibootstrap-4bootstrap-table

How to load the page with unchecked checkbox from bootstraptable


So, I started using bootstraptable these days, and after reading the documentation for some time I still didn't find how to load the page with the sort boxes unchecked, all the functions from bootstrap table are about the checkbox from the table itself... I tried a lot of option I found here but none worked. The closer one I found was the showColumnsToggleAll were I can turn all of them off, but its still not really what I need. The ideal scenario would be to leave only 2/3 checkboxs marked while the others are turned off until the user choose to use them.

The table is pretty much like the one from the example on the documentation: https://examples.bootstrap-table.com/#options/columns-search.html


Solution

  • Found out all I needed was in built function hidecolumn, if anyone needs its like this

    var $table = $('#tableexample');

    $table.bootstrapTable('hideColumn', 'yourfield');