Here's a little more fully featured answer that provides some user interaction on a per column basis. If this is going to be a dynamic experience, there needs to be a clickable toggle on each column that indicates the ability to hide the column, and then a way to restore previously hidden columns.
That would look something like this in JavaScript:
$('.hide-column').click(function(e){
var $btn = $(this);
var $cell = $btn.closest('th,td')
var $table = $btn.closest('table')
// get cell location - https://stackoverflow.com/a/4999018/1366033
var cellIndex = $cell[0].cellIndex + 1;
$table.find(".show-column-footer").show()
$table.find("tbody tr, thead tr")
.children(":nth-child("+cellIndex+")")
.hide()
})
$(".show-column-footer").click(function(e) {
var $table = $(this).closest('table')
$table.find(".show-column-footer").hide()
$table.find("th, td").show()
})
To support this, we'll add some markup to the table. In each column header, we can add something like this to provide a visual indicator of something clickable
<button class="pull-right btn btn-default btn-condensed hide-column"
data-toggle="tooltip" data-placement="bottom" title="Hide Column">
<i class="fa fa-eye-slash"></i>
</button>
We'll allow the user to restore columns via a link in the table footer. If it's not persistent by default, then toggling it on dynamically in the header could jostle around the table, but you can really put it anywhere you'd like:
<tfoot class="show-column-footer">
<tr>
<th colspan="4"><a class="show-column" href="#">Some columns hidden - click to show all</a></th>
</tr>
</tfoot>
That's the basic functionality. Here's a demo below with a couple more things fleshed out. You can also add a tooltip to the button to help clarify its purpose, style the button a little more organically to a table header, and collapse the column width in order to add some (somewhat wonky) css animations to make the transition a little less jumpy.
$(function() {_x000D_
// on init_x000D_
$(".table-hideable .hide-col").each(HideColumnIndex);_x000D_
_x000D_
// on click_x000D_
$('.hide-column').click(HideColumnIndex)_x000D_
_x000D_
function HideColumnIndex() {_x000D_
var $el = $(this);_x000D_
var $cell = $el.closest('th,td')_x000D_
var $table = $cell.closest('table')_x000D_
_x000D_
// get cell location - https://stackoverflow.com/a/4999018/1366033_x000D_
var colIndex = $cell[0].cellIndex + 1;_x000D_
_x000D_
// find and hide col index_x000D_
$table.find("tbody tr, thead tr")_x000D_
.children(":nth-child(" + colIndex + ")")_x000D_
.addClass('hide-col');_x000D_
_x000D_
// show restore footer_x000D_
$table.find(".footer-restore-columns").show()_x000D_
}_x000D_
_x000D_
// restore columns footer_x000D_
$(".restore-columns").click(function(e) {_x000D_
var $table = $(this).closest('table')_x000D_
$table.find(".footer-restore-columns").hide()_x000D_
$table.find("th, td")_x000D_
.removeClass('hide-col');_x000D_
_x000D_
})_x000D_
_x000D_
$('[data-toggle="tooltip"]').tooltip({_x000D_
trigger: 'hover'_x000D_
})_x000D_
_x000D_
})
_x000D_
body {_x000D_
padding: 15px;_x000D_
}_x000D_
_x000D_
.table-hideable td,_x000D_
.table-hideable th {_x000D_
width: auto;_x000D_
transition: width .5s, margin .5s;_x000D_
}_x000D_
_x000D_
.btn-condensed.btn-condensed {_x000D_
padding: 0 5px;_x000D_
box-shadow: none;_x000D_
}_x000D_
_x000D_
_x000D_
/* use class to have a little animation */_x000D_
.hide-col {_x000D_
width: 0px !important;_x000D_
height: 0px !important;_x000D_
display: block !important;_x000D_
overflow: hidden !important;_x000D_
margin: 0 !important;_x000D_
padding: 0 !important;_x000D_
border: none !important;_x000D_
}
_x000D_
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css">_x000D_
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/paper/bootstrap.min.css">_x000D_
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">_x000D_
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>_x000D_
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>_x000D_
_x000D_
_x000D_
_x000D_
_x000D_
<table class="table table-condensed table-hover table-bordered table-striped table-hideable">_x000D_
_x000D_
<thead>_x000D_
<tr>_x000D_
<th>_x000D_
Controller_x000D_
<button class="pull-right btn btn-default btn-condensed hide-column" data-toggle="tooltip" data-placement="bottom" title="Hide Column">_x000D_
<i class="fa fa-eye-slash"></i> _x000D_
</button>_x000D_
</th>_x000D_
<th class="hide-col">_x000D_
Action_x000D_
<button class="pull-right btn btn-default btn-condensed hide-column" data-toggle="tooltip" data-placement="bottom" title="Hide Column">_x000D_
<i class="fa fa-eye-slash"></i> _x000D_
</button>_x000D_
</th>_x000D_
<th>_x000D_
Type_x000D_
<button class="pull-right btn btn-default btn-condensed hide-column" data-toggle="tooltip" data-placement="bottom" title="Hide Column">_x000D_
<i class="fa fa-eye-slash"></i> _x000D_
</button>_x000D_
</th>_x000D_
<th>_x000D_
Attributes_x000D_
<button class="pull-right btn btn-default btn-condensed hide-column" data-toggle="tooltip" data-placement="bottom" title="Hide Column">_x000D_
<i class="fa fa-eye-slash"></i> _x000D_
</button>_x000D_
</th>_x000D_
</thead>_x000D_
<tbody>_x000D_
_x000D_
<tr>_x000D_
<td>Home</td>_x000D_
<td>Index</td>_x000D_
<td>ActionResult</td>_x000D_
<td>Authorize</td>_x000D_
</tr>_x000D_
_x000D_
<tr>_x000D_
<td>Client</td>_x000D_
<td>Index</td>_x000D_
<td>ActionResult</td>_x000D_
<td>Authorize</td>_x000D_
</tr>_x000D_
_x000D_
<tr>_x000D_
<td>Client</td>_x000D_
<td>Edit</td>_x000D_
<td>ActionResult</td>_x000D_
<td>Authorize</td>_x000D_
</tr>_x000D_
_x000D_
</tbody>_x000D_
<tfoot class="footer-restore-columns">_x000D_
<tr>_x000D_
<th colspan="4"><a class="restore-columns" href="#">Some columns hidden - click to show all</a></th>_x000D_
</tr>_x000D_
</tfoot>_x000D_
</table>
_x000D_