A typical interaction to want to perform with a fixed column, is an index column. A method for how this can be achieved with FixedColumns is shown in this example, building on the index column example for DataTables. Also shown in this example is how the fixed column can be styled with CSS to show it more prominently.
Gecko | Firefox 1.0 | Win 98+ / OSX.2+ | 1.7 | A |
Gecko | Firefox 1.5 | Win 98+ / OSX.2+ | 1.8 | A |
Gecko | Firefox 2.0 | Win 98+ / OSX.2+ | 1.8 | A |
Gecko | Firefox 3.0 | Win 2k+ / OSX.3+ | 1.9 | A |
Gecko | Camino 1.0 | OSX.2+ | 1.8 | A |
Gecko | Camino 1.5 | OSX.3+ | 1.8 | A |
Gecko | Netscape 7.2 | Win 95+ / Mac OS 8.6-9.2 | 1.7 | A |
Gecko | Netscape Browser 8 | Win 98SE+ | 1.7 | A |
Gecko | Netscape Navigator 9 | Win 98+ / OSX.2+ | 1.8 | A |
Gecko | Mozilla 1.0 | Win 95+ / OSX.1+ | 1 | A |
$(document).ready( function () { var oTable = $('#example').dataTable( { "sScrollX": "100%", "sScrollXInner": "150%", "bScrollCollapse": true, "fnDrawCallback": function ( oSettings ) { /* Need to redo the counters if filtered or sorted */ if ( oSettings.bSorted || oSettings.bFiltered ) { for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ ) { this.fnUpdate( i+1, oSettings.aiDisplay[i], 0, false, false ); } } }, "aoColumnDefs": [ { "bSortable": false, "sClass": "index", "aTargets": [ 0 ] } ], "aaSorting": [[ 1, 'asc' ]] } ); new FixedColumns( oTable ); } );