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";
11 table.DTFC_Cloned th { white-space: nowrap; }
13 <script type="text/javascript" charset="utf-8" src="../../media/js/jquery.js"></script>
14 <script type="text/javascript" charset="utf-8" src="../../media/js/jquery.dataTables.js"></script>
15 <script type="text/javascript" charset="utf-8" src="media/js/FixedColumns.js"></script>
16 <script type="text/javascript" charset="utf-8">
17 $(document).ready( function () {
18 var oTable = $('#example').dataTable( {
21 "sScrollXInner": "1200px",
22 "bScrollCollapse": true,
25 new FixedColumns( oTable, {
31 <body id="dt_example">
32 <div id="container" style="width:80%">
33 <div class="full_width big">
34 FixedColumns example - fixed width fixed column
38 <p>This example shows how the fixed column can have a specific pixel width defined for it. By giving the parameter <i>iLeftWidth</i> to FixedColumns, it will use this value to set the width of the fixed column (or columns, if multiple columns are used). Resizing the window will simply cause the DataTable scrolling area to resize dynamically. Note that sScrollXInner is used to force the width of the DataTable - you probably won't want or need this. Note also that the scaling in this demo contrasts with the <a href="scale_relative.html">relative scaling</a> example where the fixed column width is a percentage of the visible area.</p>
42 <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
45 <th>Rendering engine</th>
48 <th>Engine version</th>
54 <th>Rendering engine</th>
57 <th>Engine version</th>
67 <td class="center">4</td>
68 <td class="center">X</td>
75 <td class="center">5</td>
76 <td class="center">C</td>
83 <td class="center">5.5</td>
84 <td class="center">A</td>
91 <td class="center">6</td>
92 <td class="center">A</td>
96 <td>Internet Explorer 7</td>
98 <td class="center">7</td>
99 <td class="center">A</td>
103 <td>AOL browser (AOL desktop)</td>
105 <td class="center">6</td>
106 <td class="center">A</td>
111 <td>Win 98+ / OSX.2+</td>
112 <td class="center">1.7</td>
113 <td class="center">A</td>
117 <td>Firefox <br>1.5</td>
118 <td>Win 98+ / OSX.2+</td>
119 <td class="center">1.8</td>
120 <td class="center">A</td>
125 <td>Win 98+ / OSX.2+</td>
126 <td class="center">1.8</td>
127 <td class="center">A</td>
132 <td>Win 2k+ / OSX.3+</td>
133 <td class="center">1.9</td>
134 <td class="center">A</td>
140 <td class="center">1.8</td>
141 <td class="center">A</td>
147 <td class="center">1.8</td>
148 <td class="center">A</td>
152 <td>Netscape 7.2</td>
153 <td>Win 95+ / Mac OS 8.6-9.2</td>
154 <td class="center">1.7</td>
155 <td class="center">A</td>
159 <td>Netscape Browser 8</td>
161 <td class="center">1.7</td>
162 <td class="center">A</td>
166 <td>Netscape Navigator 9</td>
167 <td>Win 98+ / OSX.2+</td>
168 <td class="center">1.8</td>
169 <td class="center">A</td>
174 <td>Win 95+ / OSX.1+</td>
175 <td class="center">1</td>
176 <td class="center">A</td>
181 <td>Win 95+ / OSX.1+</td>
182 <td class="center">1.1</td>
183 <td class="center">A</td>
188 <td>Win 95+ / OSX.1+</td>
189 <td class="center">1.2</td>
190 <td class="center">A</td>
195 <td>Win 95+ / OSX.1+</td>
196 <td class="center">1.3</td>
197 <td class="center">A</td>
202 <td>Win 95+ / OSX.1+</td>
203 <td class="center">1.4</td>
204 <td class="center">A</td>
209 <td>Win 95+ / OSX.1+</td>
210 <td class="center">1.5</td>
211 <td class="center">A</td>
216 <td>Win 95+ / OSX.1+</td>
217 <td class="center">1.6</td>
218 <td class="center">A</td>
223 <td>Win 98+ / OSX.1+</td>
224 <td class="center">1.7</td>
225 <td class="center">A</td>
230 <td>Win 98+ / OSX.1+</td>
231 <td class="center">1.8</td>
232 <td class="center">A</td>
236 <td>Seamonkey 1.1</td>
237 <td>Win 98+ / OSX.2+</td>
238 <td class="center">1.8</td>
239 <td class="center">A</td>
243 <td>Epiphany 2.20</td>
245 <td class="center">1.8</td>
246 <td class="center">A</td>
252 <td class="center">125.5</td>
253 <td class="center">A</td>
259 <td class="center">312.8</td>
260 <td class="center">A</td>
266 <td class="center">419.3</td>
267 <td class="center">A</td>
273 <td class="center">522.1</td>
274 <td class="center">A</td>
280 <td class="center">420</td>
281 <td class="center">A</td>
285 <td>iPod Touch / iPhone</td>
287 <td class="center">420.1</td>
288 <td class="center">A</td>
294 <td class="center">413</td>
295 <td class="center">A</td>
300 <td>Win 95+ / OSX.1+</td>
301 <td class="center">-</td>
302 <td class="center">A</td>
307 <td>Win 95+ / OSX.2+</td>
308 <td class="center">-</td>
309 <td class="center">A</td>
314 <td>Win 95+ / OSX.2+</td>
315 <td class="center">-</td>
316 <td class="center">A</td>
321 <td>Win 95+ / OSX.2+</td>
322 <td class="center">-</td>
323 <td class="center">A</td>
328 <td>Win 95+ / OSX.3+</td>
329 <td class="center">-</td>
330 <td class="center">A</td>
335 <td>Win 88+ / OSX.3+</td>
336 <td class="center">-</td>
337 <td class="center">A</td>
342 <td>Win 88+ / OSX.3+</td>
343 <td class="center">-</td>
344 <td class="center">A</td>
348 <td>Opera for Wii</td>
350 <td class="center">-</td>
351 <td class="center">A</td>
357 <td class="center">-</td>
358 <td class="center">A</td>
362 <td>Nintendo DS browser</td>
364 <td class="center">8.5</td>
365 <td class="center">C/A</td>
369 <td>Konqureror 3.1</td>
371 <td class="center">3.1</td>
372 <td class="center">C</td>
376 <td>Konqureror 3.3</td>
378 <td class="center">3.3</td>
379 <td class="center">A</td>
383 <td>Konqureror 3.5</td>
385 <td class="center">3.5</td>
386 <td class="center">A</td>
390 <td>Internet Explorer 4.5</td>
392 <td class="center">-</td>
393 <td class="center">X</td>
397 <td>Internet Explorer 5.1</td>
398 <td>Mac OS 7.6-9</td>
399 <td class="center">1</td>
400 <td class="center">C</td>
404 <td>Internet Explorer 5.2</td>
406 <td class="center">1</td>
407 <td class="center">C</td>
411 <td>NetFront 3.1</td>
412 <td>Embedded devices</td>
413 <td class="center">-</td>
414 <td class="center">C</td>
418 <td>NetFront 3.4</td>
419 <td>Embedded devices</td>
420 <td class="center">-</td>
421 <td class="center">A</td>
426 <td>Embedded devices</td>
427 <td class="center">-</td>
428 <td class="center">X</td>
434 <td class="center">-</td>
435 <td class="center">X</td>
441 <td class="center">-</td>
442 <td class="center">X</td>
447 <td>Windows Mobile 6</td>
448 <td class="center">-</td>
449 <td class="center">C</td>
455 <td class="center">-</td>
456 <td class="center">C</td>
459 <td>Other browsers</td>
462 <td class="center">-</td>
463 <td class="center">U</td>
468 <div class="spacer"></div>
471 <h1>Initialisation code</h1>
472 <pre>$(document).ready( function () {
473 var oTable = $('#example').dataTable( {
476 "sScrollXInner": "1200px",
477 "bScrollCollapse": true,
480 new FixedColumns( oTable, {
486 <h1>Documentation</h1>
488 <li><a href="http://datatables.net/extras/fixedcolumns">Usage</a></li>
489 <li><a href="http://datatables.net/docs/FixedColumns">API / parameters</a></li>
492 <h1>Basic examples</h1>
494 <li><a href="index.html">Basic demo of FixedColumns with zero initialisation</a></li>
495 <li><a href="left_right_columns.html">Fix the left and right columns in place</a></li>
496 <li><a href="index_column.html">Index column attached to side of the table</a></li>
497 <li><a href="x_y_scrolling.html">Index column, but with Y scrolling and no pagination</a></li>
498 <li><a href="two_columns.html">Two columns fixed in place</a></li>
499 <li><a href="right_column.html">Fix the right column in place</a></li>
500 <li><a href="css_size.html">Speeding up row height matching with CSS</a></li>
501 <li><a href="themed.html">jQuery UI themed table with FixedColumns</a></li>
504 <h1>Advanced examples</h1>
506 <li><a href="rowspan.html">Using ROWSPAN with FixedColumns</a></li>
507 <li><a href="server-side-processing.html">Server-side processing with FixedColumns</a></li>
508 <li><a href="col_filter.html">Individual column filtering</a></li>
509 <li><a href="scale_fixed.html">Setting the fixed column width and resizing the table</a></li>
510 <li><a href="scale_relative.html">Setting the fixed column width with relative sizing</a></li>
511 <li><a href="row_grouping_height.html">Row grouping by grouping like rows in the fixed column</a></li>
512 <li><a href="row_grouping.html">Row grouping by inserting a grouping row</a></li>
516 <div id="footer" style="text-align:center;">
517 <span style="font-size:10px;">
518 FixedColumns and DataTables © Allan Jardine 2011.<br>