Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | # FixedColumns |
| 2 | |||
| 3 | When making use of DataTables' x-axis scrolling feature (`scrollX`), you may wish to fix the left or right most columns in place. This plug-in for DataTables provides exactly this option (for non-scrolling tables, please use the FixedHeader plug-in, which can fix headers, footers and columns). Key features include: |
||
| 4 | |||
| 5 | * Freezes the left most column to the side of the table |
||
| 6 | * Option to freeze two or more columns |
||
| 7 | * Full integration with DataTables' scrolling options |
||
| 8 | |||
| 9 | |||
| 10 | # Installation |
||
| 11 | |||
| 12 | To use FixedColumns, first download DataTables ( http://datatables.net/download ) and place the unzipped FixedColumns package into a `extensions` directory in the DataTables package. This will allow the pages in the examples to operate correctly. To see the examples running, open the `examples` directory in your web-browser. |
||
| 13 | |||
| 14 | |||
| 15 | # Basic usage |
||
| 16 | |||
| 17 | FixedColumns is initialised using the `$.fn.dataTable.FixedColumns()` constructor. For example: |
||
| 18 | |||
| 19 | ```js |
||
| 20 | $(document).ready(function() { |
||
| 21 | var table = $('#example').DataTable( { |
||
| 22 | scrollY: "300px", |
||
| 23 | scrollX: true, |
||
| 24 | scrollCollapse: true, |
||
| 25 | paging: false |
||
| 26 | } ); |
||
| 27 | |||
| 28 | new $.fn.dataTable.FixedColumns( table ); |
||
| 29 | } ); |
||
| 30 | ``` |
||
| 31 | |||
| 32 | |||
| 33 | # Documentation / support |
||
| 34 | |||
| 35 | * Documentation: http://datatables.net/extensions/FixedColumns/ |
||
| 36 | * DataTables support forums: http://datatables.net/forums |
||
| 37 | |||
| 38 | |||
| 39 | # GitHub |
||
| 40 | |||
| 41 | If you fancy getting involved with the development of FixedColumns and help make it better, please refer to its GitHub repo: https://github.com/DataTables/FixedColumns |
||
| 42 |