The API for ColVis is fairly simple:
fnRebuild or rebuild Why two names? Show details |
Reconstruct the list of columns based on the current visibility (if changed by an external process for example) and the column titles. Note that this function is available as both a static method and an instance method, although typically the static one will be used with a table selecting parameter since the ColVis instances are 'hidden' by DataTables (although accessible through ColVis.aoInstances if you do want them). |
| Default: | |
| Input parameters: |
|
| Return parameter: | void |
| Code example: |
$(document).ready( function () {
var oTable = $('#example').dataTable( {
"sDom": 'C<"clear">lfrtip'
} );
oTable.fnSetColumnVis( 2, false );
ColVis.fnRebuild( oTable );
} );
|