1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv="content-type" content="text/html; charset=utf-8">
5 <link rel="shortcut icon" type="image/ico" href="http://www.sprymedia.co.uk/media/images/favicon.ico">
7 <title>FixedColumns example</title>
8 <style type="text/css" title="currentStyle">
9 @import "../../media/css/demo_page.css";
10 @import "../../media/css/demo_table.css";
12 <script type="text/javascript" charset="utf-8" src="../../media/js/jquery.js"></script>
13 <script type="text/javascript" charset="utf-8" src="../../media/js/jquery.dataTables.js"></script>
14 <script type="text/javascript" charset="utf-8" src="media/js/FixedColumns.js"></script>
15 <script type="text/javascript" charset="utf-8">
16 $(document).ready( function () {
17 var oTable = $('#example').dataTable( {
20 "sScrollXInner": "150%",
21 "bScrollCollapse": true,
24 new FixedColumns( oTable );
28 <body id="dt_example">
30 <div class="full_width big">
31 FixedColumns example - basic initialisation
35 <p>When displaying a table which scrolls along the x-axis, it can sometimes be useful to the end user for the left most column to be fixed in place, if it shows grouping, index or similar information. This is basically the same idea as 'freeze columns' in Excel. This can be achieved with the FixedColumns plug-in for DataTables, as shown below.</p>
36 <p>Note that FixedColumns is suitable only for use with the scrolling features in <a href="http://datatables.net">DataTables</a>. If you want to achieve a similar effect without scrolling enabled, please checkout <a href="http://datatables.net/plug-ins">FixedHeader</a>, also for DataTables.</p>
40 <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
43 <th>Rendering engine</th>
46 <th>Engine version</th>
52 <th>Rendering engine</th>
55 <th>Engine version</th>
65 <td class="center">4</td>
66 <td class="center">X</td>
73 <td class="center">5</td>
74 <td class="center">C</td>
81 <td class="center">5.5</td>
82 <td class="center">A</td>
89 <td class="center">6</td>
90 <td class="center">A</td>
94 <td>Internet Explorer 7</td>
96 <td class="center">7</td>
97 <td class="center">A</td>
101 <td>AOL browser (AOL desktop)</td>
103 <td class="center">6</td>
104 <td class="center">A</td>
109 <td>Win 98+ / OSX.2+</td>
110 <td class="center">1.7</td>
111 <td class="center">A</td>
115 <td>Firefox <br>1.5</td>
116 <td>Win 98+ / OSX.2+</td>
117 <td class="center">1.8</td>
118 <td class="center">A</td>
123 <td>Win 98+ / OSX.2+</td>
124 <td class="center">1.8</td>
125 <td class="center">A</td>
130 <td>Win 2k+ / OSX.3+</td>
131 <td class="center">1.9</td>
132 <td class="center">A</td>
138 <td class="center">1.8</td>
139 <td class="center">A</td>
145 <td class="center">1.8</td>
146 <td class="center">A</td>
150 <td>Netscape 7.2</td>
151 <td>Win 95+ / Mac OS 8.6-9.2</td>
152 <td class="center">1.7</td>
153 <td class="center">A</td>
157 <td>Netscape Browser 8</td>
159 <td class="center">1.7</td>
160 <td class="center">A</td>
164 <td>Netscape Navigator 9</td>
165 <td>Win 98+ / OSX.2+</td>
166 <td class="center">1.8</td>
167 <td class="center">A</td>
172 <td>Win 95+ / OSX.1+</td>
173 <td class="center">1</td>
174 <td class="center">A</td>
179 <td>Win 95+ / OSX.1+</td>
180 <td class="center">1.1</td>
181 <td class="center">A</td>
186 <td>Win 95+ / OSX.1+</td>
187 <td class="center">1.2</td>
188 <td class="center">A</td>
193 <td>Win 95+ / OSX.1+</td>
194 <td class="center">1.3</td>
195 <td class="center">A</td>
200 <td>Win 95+ / OSX.1+</td>
201 <td class="center">1.4</td>
202 <td class="center">A</td>
207 <td>Win 95+ / OSX.1+</td>
208 <td class="center">1.5</td>
209 <td class="center">A</td>
214 <td>Win 95+ / OSX.1+</td>
215 <td class="center">1.6</td>
216 <td class="center">A</td>
221 <td>Win 98+ / OSX.1+</td>
222 <td class="center">1.7</td>
223 <td class="center">A</td>
228 <td>Win 98+ / OSX.1+</td>
229 <td class="center">1.8</td>
230 <td class="center">A</td>
234 <td>Seamonkey 1.1</td>
235 <td>Win 98+ / OSX.2+</td>
236 <td class="center">1.8</td>
237 <td class="center">A</td>
241 <td>Epiphany 2.20</td>
243 <td class="center">1.8</td>
244 <td class="center">A</td>
250 <td class="center">125.5</td>
251 <td class="center">A</td>
257 <td class="center">312.8</td>
258 <td class="center">A</td>
264 <td class="center">419.3</td>
265 <td class="center">A</td>
271 <td class="center">522.1</td>
272 <td class="center">A</td>
278 <td class="center">420</td>
279 <td class="center">A</td>
283 <td>iPod Touch / iPhone</td>
285 <td class="center">420.1</td>
286 <td class="center">A</td>
292 <td class="center">413</td>
293 <td class="center">A</td>
298 <td>Win 95+ / OSX.1+</td>
299 <td class="center">-</td>
300 <td class="center">A</td>
305 <td>Win 95+ / OSX.2+</td>
306 <td class="center">-</td>
307 <td class="center">A</td>
312 <td>Win 95+ / OSX.2+</td>
313 <td class="center">-</td>
314 <td class="center">A</td>
319 <td>Win 95+ / OSX.2+</td>
320 <td class="center">-</td>
321 <td class="center">A</td>
326 <td>Win 95+ / OSX.3+</td>
327 <td class="center">-</td>
328 <td class="center">A</td>
333 <td>Win 88+ / OSX.3+</td>
334 <td class="center">-</td>
335 <td class="center">A</td>
340 <td>Win 88+ / OSX.3+</td>
341 <td class="center">-</td>
342 <td class="center">A</td>
346 <td>Opera for Wii</td>
348 <td class="center">-</td>
349 <td class="center">A</td>
355 <td class="center">-</td>
356 <td class="center">A</td>
360 <td>Nintendo DS browser</td>
362 <td class="center">8.5</td>
363 <td class="center">C/A</td>
367 <td>Konqureror 3.1</td>
369 <td class="center">3.1</td>
370 <td class="center">C</td>
374 <td>Konqureror 3.3</td>
376 <td class="center">3.3</td>
377 <td class="center">A</td>
381 <td>Konqureror 3.5</td>
383 <td class="center">3.5</td>
384 <td class="center">A</td>
388 <td>Internet Explorer 4.5</td>
390 <td class="center">-</td>
391 <td class="center">X</td>
395 <td>Internet Explorer 5.1</td>
396 <td>Mac OS 7.6-9</td>
397 <td class="center">1</td>
398 <td class="center">C</td>
402 <td>Internet Explorer 5.2</td>
404 <td class="center">1</td>
405 <td class="center">C</td>
409 <td>NetFront 3.1</td>
410 <td>Embedded devices</td>
411 <td class="center">-</td>
412 <td class="center">C</td>
416 <td>NetFront 3.4</td>
417 <td>Embedded devices</td>
418 <td class="center">-</td>
419 <td class="center">A</td>
424 <td>Embedded devices</td>
425 <td class="center">-</td>
426 <td class="center">X</td>
432 <td class="center">-</td>
433 <td class="center">X</td>
439 <td class="center">-</td>
440 <td class="center">X</td>
445 <td>Windows Mobile 6</td>
446 <td class="center">-</td>
447 <td class="center">C</td>
453 <td class="center">-</td>
454 <td class="center">C</td>
457 <td>Other browsers</td>
460 <td class="center">-</td>
461 <td class="center">U</td>
466 <div class="spacer"></div>
469 <h1>Initialisation code</h1>
470 <pre>$(document).ready( function () {
471 var oTable = $('#example').dataTable( {
473 "sScrollXInner": "150%",
474 "bScrollCollapse": true
476 new FixedColumns( oTable );
480 <h1>Documentation</h1>
482 <li><a href="http://datatables.net/extras/fixedcolumns">Usage</a></li>
483 <li><a href="http://datatables.net/docs/FixedColumns">API / parameters</a></li>
486 <h1>Basic examples</h1>
488 <li><a href="index.html">Basic demo of FixedColumns with zero initialisation</a></li>
489 <li><a href="left_right_columns.html">Fix the left and right columns in place</a></li>
490 <li><a href="index_column.html">Index column attached to side of the table</a></li>
491 <li><a href="x_y_scrolling.html">Index column, but with Y scrolling and no pagination</a></li>
492 <li><a href="two_columns.html">Two columns fixed in place</a></li>
493 <li><a href="right_column.html">Fix the right column in place</a></li>
494 <li><a href="css_size.html">Speeding up row height matching with CSS</a></li>
495 <li><a href="themed.html">jQuery UI themed table with FixedColumns</a></li>
498 <h1>Advanced examples</h1>
500 <li><a href="rowspan.html">Using ROWSPAN with FixedColumns</a></li>
501 <li><a href="server-side-processing.html">Server-side processing with FixedColumns</a></li>
502 <li><a href="col_filter.html">Individual column filtering</a></li>
503 <li><a href="scale_fixed.html">Setting the fixed column width and resizing the table</a></li>
504 <li><a href="scale_relative.html">Setting the fixed column width with relative sizing</a></li>
505 <li><a href="row_grouping_height.html">Row grouping by grouping like rows in the fixed column</a></li>
506 <li><a href="row_grouping.html">Row grouping by inserting a grouping row</a></li>
510 <div id="footer" style="text-align:center;">
511 <span style="font-size:10px;">
512 FixedColumns and DataTables © Allan Jardine 2011.<br>