5 <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
6 <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
8 <title>ColReorder example - FixedColumns integration</title>
9 <link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
10 <link rel="stylesheet" type="text/css" href="../css/dataTables.colReorder.css">
11 <link rel="stylesheet" type="text/css" href="../../FixedColumns/css/dataTables.fixedColumns.css">
12 <link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
13 <link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
14 <style type="text/css" class="init">
17 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
18 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
19 <script type="text/javascript" language="javascript" src="../js/dataTables.colReorder.js"></script>
20 <script type="text/javascript" language="javascript" src="../../FixedColumns/js/dataTables.fixedColumns.js"></script>
21 <script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
22 <script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
23 <script type="text/javascript" language="javascript" class="init">
27 $(document).ready(function() {
28 window.table = $('#example').DataTable( {
33 { orderable: false, targets: 0 },
34 { orderable: false, targets: -1 }
36 ordering: [[ 1, 'asc' ]],
43 window.fc = new $.fn.dataTable.FixedColumns( table, {
54 <body class="dt-example">
55 <div class="container">
57 <h1>ColReorder example <span>FixedColumns integration</span></h1>
60 <p>While ColReorder works with the built-in scrolling options in DataTables (<a href="//datatables.net/reference/option/scrollY"><code class="option" title=
61 "DataTables initialisation option">scrollY<span>DT</span></code></a> and <a href="//datatables.net/reference/option/scrollX"><code class="option" title=
62 "DataTables initialisation option">scrollX<span>DT</span></code></a>) and also the <a href="//datatables.net/extensions/fixedcolumns">FixedColumns
65 <p>ColReorder provides the <code>fixedColumnsLeft</code> and <code>fixedColumnsRight</code> options which allows you disallow reordering of the fixed columns
66 (which is required).</p>
69 <table id="example" class="display nowrap" cellspacing="0" width="100%">
88 <td>System Architect</td>
94 <td>t.nixon@datatables.net</td>
105 <td>g.winters@datatables.net</td>
110 <td>Junior Technical Author</td>
111 <td>San Francisco</td>
116 <td>a.cox@datatables.net</td>
121 <td>Senior Javascript Developer</td>
127 <td>c.kelly@datatables.net</td>
138 <td>a.satou@datatables.net</td>
143 <td>Integration Specialist</td>
149 <td>b.williamson@datatables.net</td>
154 <td>Sales Assistant</td>
155 <td>San Francisco</td>
160 <td>h.chandler@datatables.net</td>
165 <td>Integration Specialist</td>
171 <td>r.davidson@datatables.net</td>
176 <td>Javascript Developer</td>
177 <td>San Francisco</td>
182 <td>c.hurst@datatables.net</td>
187 <td>Software Engineer</td>
193 <td>s.frost@datatables.net</td>
198 <td>Office Manager</td>
204 <td>j.gaines@datatables.net</td>
209 <td>Support Lead</td>
215 <td>q.flynn@datatables.net</td>
220 <td>Regional Director</td>
221 <td>San Francisco</td>
226 <td>c.marshall@datatables.net</td>
231 <td>Senior Marketing Designer</td>
237 <td>h.kennedy@datatables.net</td>
242 <td>Regional Director</td>
248 <td>t.fitzpatrick@datatables.net</td>
253 <td>Marketing Designer</td>
259 <td>m.silva@datatables.net</td>
264 <td>Chief Financial Officer (CFO)</td>
270 <td>p.byrd@datatables.net</td>
275 <td>Systems Administrator</td>
281 <td>g.little@datatables.net</td>
286 <td>Software Engineer</td>
292 <td>b.greer@datatables.net</td>
297 <td>Personnel Lead</td>
303 <td>d.rios@datatables.net</td>
308 <td>Development Lead</td>
314 <td>j.caldwell@datatables.net</td>
319 <td>Chief Marketing Officer (CMO)</td>
325 <td>y.berry@datatables.net</td>
330 <td>Pre-Sales Support</td>
336 <td>c.vance@datatables.net</td>
341 <td>Sales Assistant</td>
347 <td>d.wilder@datatables.net</td>
352 <td>Chief Executive Officer (CEO)</td>
358 <td>a.ramos@datatables.net</td>
369 <td>g.joyce@datatables.net</td>
374 <td>Regional Director</td>
380 <td>j.chang@datatables.net</td>
385 <td>Software Engineer</td>
386 <td>San Francisco</td>
391 <td>b.wagner@datatables.net</td>
396 <td>Chief Operating Officer (COO)</td>
397 <td>San Francisco</td>
402 <td>f.green@datatables.net</td>
407 <td>Regional Marketing</td>
413 <td>s.itou@datatables.net</td>
418 <td>Integration Specialist</td>
424 <td>m.house@datatables.net</td>
435 <td>s.burks@datatables.net</td>
440 <td>Technical Author</td>
446 <td>p.bartlett@datatables.net</td>
452 <td>San Francisco</td>
457 <td>g.cortez@datatables.net</td>
462 <td>Post-Sales support</td>
468 <td>m.mccray@datatables.net</td>
473 <td>Marketing Designer</td>
474 <td>San Francisco</td>
479 <td>u.butler@datatables.net</td>
484 <td>Office Manager</td>
485 <td>San Francisco</td>
490 <td>h.hatfield@datatables.net</td>
496 <td>San Francisco</td>
501 <td>h.fuentes@datatables.net</td>
506 <td>Financial Controller</td>
507 <td>San Francisco</td>
512 <td>v.harrell@datatables.net</td>
517 <td>Office Manager</td>
523 <td>t.mooney@datatables.net</td>
534 <td>j.bradshaw@datatables.net</td>
539 <td>Support Engineer</td>
545 <td>o.liang@datatables.net</td>
550 <td>Software Engineer</td>
556 <td>b.nash@datatables.net</td>
561 <td>Support Engineer</td>
567 <td>s.yamamoto@datatables.net</td>
578 <td>t.walton@datatables.net</td>
583 <td>Support Engineer</td>
584 <td>San Francisco</td>
589 <td>f.camacho@datatables.net</td>
594 <td>Data Coordinator</td>
600 <td>s.baldwin@datatables.net</td>
605 <td>Software Engineer</td>
611 <td>z.frank@datatables.net</td>
616 <td>Software Engineer</td>
617 <td>San Francisco</td>
622 <td>z.serrano@datatables.net</td>
627 <td>Junior Javascript Developer</td>
633 <td>j.acosta@datatables.net</td>
638 <td>Sales Assistant</td>
644 <td>c.stevens@datatables.net</td>
649 <td>Regional Director</td>
655 <td>h.butler@datatables.net</td>
660 <td>Systems Administrator</td>
666 <td>l.greer@datatables.net</td>
672 <td>San Francisco</td>
677 <td>j.alexander@datatables.net</td>
682 <td>Regional Director</td>
688 <td>s.decker@datatables.net</td>
693 <td>Javascript Developer</td>
699 <td>m.bruce@datatables.net</td>
704 <td>Customer Support</td>
710 <td>d.snider@datatables.net</td>
716 <li class="active">Javascript</li>
720 <li>Server-side script</li>
725 <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
726 window.table = $('#example').DataTable( {
729 scrollCollapse: true,
731 { orderable: false, targets: 0 },
732 { orderable: false, targets: -1 }
734 ordering: [[ 1, 'asc' ]],
741 window.fc = new $.fn.dataTable.FixedColumns( table, {
747 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
750 <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
751 <li><a href="../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
752 <li><a href="../js/dataTables.colReorder.js">../js/dataTables.colReorder.js</a></li>
753 <li><a href="../../FixedColumns/js/dataTables.fixedColumns.js">../../FixedColumns/js/dataTables.fixedColumns.js</a></li>
758 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
763 <p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
764 additional CSS used is shown below:</p><code class="multiline language-css"></code>
767 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
770 <li><a href="../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
771 <li><a href="../css/dataTables.colReorder.css">../css/dataTables.colReorder.css</a></li>
772 <li><a href="../../FixedColumns/css/dataTables.fixedColumns.css">../../FixedColumns/css/dataTables.fixedColumns.css</a></li>
777 <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
782 <p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
783 processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
784 documentation</a>.</p>
792 <div class="gradient"></div>
795 <h2>Other examples</h2>
798 <div class="toc-group">
799 <h3><a href="./index.html">Examples</a></h3>
800 <ul class="toc active">
801 <li><a href="./simple.html">Basic initialisation</a></li>
802 <li><a href="./new_init.html">Initialisation using `new`</a></li>
803 <li><a href="./alt_insert.html">Alternative insert styling</a></li>
804 <li><a href="./realtime.html">Realtime updating</a></li>
805 <li><a href="./state_save.html">State saving</a></li>
806 <li><a href="./scrolling.html">Scrolling table</a></li>
807 <li><a href="./predefined.html">Predefined column ordering</a></li>
808 <li><a href="./reset.html">Reset ordering API</a></li>
809 <li><a href="./colvis.html">ColVis integration</a></li>
810 <li class="active"><a href="./fixedcolumns.html">FixedColumns integration</a></li>
811 <li><a href="./fixedheader.html">FixedHeader integration</a></li>
812 <li><a href="./jqueryui.html">jQuery UI styling</a></li>
813 <li><a href="./col_filter.html">Individual column filtering</a></li>
814 <li><a href="./server_side.html">Server-side processing</a></li>
819 <div class="epilogue">
820 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
821 Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
822 which extend the capabilities of DataTables.</p>
824 <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
825 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>