I am having problems with the Bootstrap-Table plugin:
https://github.com/wenzhixin/bootstrap-table
I have a hidden column id in a table that I need to hide. But I can not do
<th data-field="id" data-visible="false">ID</th>
because it removes it from the DOM. I need to save the identifier in the DOM , as it is used in the form view. It just needs to be hidden.
This does not work either, my style is lost and the column does not exist:
<th data-field="id" style="display:none;>ID</th>
I can't even use jQuery to hide a column manually! In other words, I tried the following after onPostBody and it never started!
<table id="delegateTable" data-toggle="table" data-url="delegates.action"
data-response-handler="delegatesResponseHandler">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="delegate" style="width:10%">Delegate</th>
</thead>
</table>
jQuery Doc OnReady:
$(document).ready(function() {
$('#delegateTable').bootstrapTable({
onPostBody : function() {
$('#delegateTable td:nth-child(0), th:nth-child(0)').hide();
alert('column hidden');
}
});
It never gets into this onPostBody.