<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>ColReorder — DataTables forums</title>
        <link>https://next.datatables.net/forums/</link>
        <pubDate>Wed, 22 Jul 2026 01:35:46 +0000</pubDate>
        <language>en</language>
            <description>ColReorder — DataTables forums</description>
    <language>en</language>
    <atom:link href="https://next.datatables.net/forums/categories/colreorder/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Different behavior with reorder button and "Move to the Left / Right" menu</title>
        <link>https://next.datatables.net/forums/discussion/81490/different-behavior-with-reorder-button-and-move-to-the-left-right-menu</link>
        <pubDate>Thu, 30 Oct 2025 15:37:30 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>slolo</dc:creator>
        <guid isPermaLink="false">81490@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>: <a rel="nofollow" href="https://live.datatables.net/ziyuroki/1/edit">https://live.datatables.net/ziyuroki/1/edit</a><br />
<strong>Debugger code (debug.datatables.net)</strong>: NA<br />
<strong>Error messages shown</strong>: NA<br />
<strong>Description of problem</strong>: Hello,</p>

<p>I would like to know if it is a bug.<br />
Int the test case, I have the first and last columns that are not reorderable.</p>

<p>If you try to move the second to last column to the right with the reorderable button on the header, you cannot (that is normal for me as the last column is not reorderable)</p>

<p>But, if you use the button "reorderRight", you can see that you are able to move the second to last column to the right.<br />
<img src="https://datatables.net/forums/uploads/editor/az/8cmhp309wmjf.png" alt="" title="" /></p>

<p>Is it normal that there is two different behavior?</p>

<p>And it is the same for the first and the second column if you want to make a test.</p>

<p>Thanks in advance for you answer and have a nice day.</p>

<p>Lolo</p>
]]>
        </description>
    </item>
    <item>
        <title>ColReorder React</title>
        <link>https://next.datatables.net/forums/discussion/81379/colreorder-react</link>
        <pubDate>Sun, 21 Sep 2025 05:24:36 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>mete12</dc:creator>
        <guid isPermaLink="false">81379@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>: <a rel="nofollow" href="https://stackblitz.com/edit/n6zmnfa5?file=src%2FApp.tsx">https://stackblitz.com/edit/n6zmnfa5?file=src%2FApp.tsx</a><br />
<strong>Description of problem</strong>: Code is generated by the builder. ColReorder doesn't work properly. See the loom recording below.<br />
<a rel="nofollow" href="https://www.loom.com/share/9ca663843629440b9cfd4381a67ed24d">https://www.loom.com/share/9ca663843629440b9cfd4381a67ed24d</a></p>
]]>
        </description>
    </item>
    <item>
        <title>Pesky "column count mismatch" issue</title>
        <link>https://next.datatables.net/forums/discussion/80960/pesky-column-count-mismatch-issue</link>
        <pubDate>Tue, 27 May 2025 21:07:51 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>chbocca</dc:creator>
        <guid isPermaLink="false">80960@/forums/discussions</guid>
        <description><![CDATA[<p>Hi again.</p>

<p>In my production program, I keep getting this pesky error message: "DataTables warning: table id=mfoptable - ColReorder - column count mismatch"</p>

<p>It happens whenever I update the table headers and then re-initialize.</p>

<p>I've tried recreating the error in a <a rel="nofollow" href="https://charlesbalcony.com/demo/colReorder_htmlsub.php" title="demo">demo</a> program using same html and dt version, but unfortunately, unless I force a "th and td" mismatch, I cannot get the error to repeat.</p>

<p>In the <a rel="nofollow" href="https://charlesbalcony.com/demo/colReorder_htmlsub.php" title="demo">demo</a>, you can hit the botton: "Change column headers." Success each time, no errors! It simply updates the html and ColumnsDefs options with each toggle, then re-initializes.</p>

<p>But the "same code" in the production program results in the error each time.</p>

<p>I've been suppressing it with: DataTable.ext.errMode = 'none';</p>

<p>So, <strong>my question</strong>: Is the any way to see more of what is triggering the message?</p>

<p>I've already performed every suggestion in your note: <a rel="nofollow" href="https://datatables.net/manual/tech-notes/18">https://datatables.net/manual/tech-notes/18</a></p>

<p>Thanks, as always, in advance.</p>
]]>
        </description>
    </item>
    <item>
        <title>YADCF with searchBuilder - ColReorder error when dynamic data</title>
        <link>https://next.datatables.net/forums/discussion/80404/yadcf-with-searchbuilder-colreorder-error-when-dynamic-data</link>
        <pubDate>Thu, 02 Jan 2025 18:07:08 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>OnLog</dc:creator>
        <guid isPermaLink="false">80404@/forums/discussions</guid>
        <description><![CDATA[<p>Hi.</p>

<p>I have table with dynamic data. When using YADCF, searchBuilder and colReorder I got error: <strong>can't access property "mData", N.aoColumns[l] is undefined</strong>, when reordering the columns. The error seams to come from YADCF.</p>

<p>It works when:<br />
- I turn off YADCF<br />
- or removing searchBuilder<br />
- or have static data direct in my HTML</p>

<p>In this test case I get error, but still it seem like the colReorder is working, however, in my main project, the order get messed up. Am I missing somthing in the dynamic data setup?</p>

<p><strong>Test case:</strong><br />
<a rel="nofollow" href="https://jsfiddle.net/supernova404/9fdsr5cj/216/" title="https://jsfiddle.net/supernova404/9fdsr5cj/216/"></a><a rel="nofollow" href="https://jsfiddle.net/supernova404/9fdsr5cj/216/">https://jsfiddle.net/supernova404/9fdsr5cj/216/</a></p>
]]>
        </description>
    </item>
    <item>
        <title>Event for column Dropped After Reordering?</title>
        <link>https://next.datatables.net/forums/discussion/80269/event-for-column-dropped-after-reordering</link>
        <pubDate>Tue, 26 Nov 2024 20:23:49 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>Jason B Jones</dc:creator>
        <guid isPermaLink="false">80269@/forums/discussions</guid>
        <description><![CDATA[<p>I need a function to run exactly one time for every column reordering, only after it has been dropped. Both the column-reorder and columns-reordered events seem to fire while dragging. Looks like this was previously achieved with the depreciated realtime option. Was this replaced with another solution to this problem?</p>

<p>Alternatively, I could use the details.drop flag in conjunction with those events but I have not observed the value of this to ever be defined in my testing</p>
]]>
        </description>
    </item>
    <item>
        <title>I noticed that with colReorder 1.7.0 lower performances compared to 1.5.4</title>
        <link>https://next.datatables.net/forums/discussion/77962/i-noticed-that-with-colreorder-1-7-0-lower-performances-compared-to-1-5-4</link>
        <pubDate>Fri, 12 Jan 2024 10:27:47 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>ufficio.fornitori</dc:creator>
        <guid isPermaLink="false">77962@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>: In a table with 92 columns the function table.colReorder.order(reOrderList, true); is extremely slow and compared with the ColReorder 1.5.4 the performances went from 9s to 15s</p>
]]>
        </description>
    </item>
    <item>
        <title>Drag&amp;Drop Column causes the sorting event to be activated in Firefox (Chrome and Edge works fine)</title>
        <link>https://next.datatables.net/forums/discussion/71733/drag-drop-column-causes-the-sorting-event-to-be-activated-in-firefox-chrome-and-edge-works-fine</link>
        <pubDate>Fri, 18 Feb 2022 14:40:20 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>jinyjose</dc:creator>
        <guid isPermaLink="false">71733@/forums/discussions</guid>
        <description><![CDATA[<p>Hello,<br />
If the ColReorder and scrollY / scrollX Option are used together, then in Firefox Browser, when one column is dragged and dropped, it automatically sorts the column as well. However, this behaviour is not present in Chrome and Edge Browsers. Is there any way to prevent the sorting function from being activated while dragging and dropping the column.</p>

<p>The effect can be seen in this example : <a rel="nofollow" href="https://datatables.net/extensions/colreorder/examples/initialisation/scrolling.html">https://datatables.net/extensions/colreorder/examples/initialisation/scrolling.html</a></p>

<p>Thanking you in advance.</p>

<p>Best regards,<br />
Jiny Jose</p>
]]>
        </description>
    </item>
    <item>
        <title>RowReorder fails after 1st reorder when dependent field is enabled.</title>
        <link>https://next.datatables.net/forums/discussion/75533/rowreorder-fails-after-1st-reorder-when-dependent-field-is-enabled</link>
        <pubDate>Thu, 23 Feb 2023 16:38:48 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>koniahin</dc:creator>
        <guid isPermaLink="false">75533@/forums/discussions</guid>
        <description><![CDATA[<p>Environment: latest laravel and bootstrap 4</p>

<p>The Contacts  form is a multi-level form which in the parent uses  rowOrder sorting and also a dependent field.</p>

<p>parentEditor.dependent( 'project_contacts.country_code', '/bin/contacts/regions' );</p>

<p>This works great when selecting a  country then a region. However through quite some  testing I identified a failure with rowOrder. In the image you will see 10 rows. Excluding the nancy row the first  4 and last 4 have no  country. If I attempt to do a reorder contained within either  set roworder works splendidly.</p>

<p><img src="https://datatables.net/forums/uploads/editor/yj/66zjtoe7bfyt.png" alt="" title="" /></p>

<p>Moving around 1-4 or 7-10 is great. When I reorder the Zigfried row with a country selected the the reorder works but  returns a console error with regions and reorder subsequently fails.</p>

<p>The console error image:</p>

<p><img src="https://datatables.net/forums/uploads/editor/5d/sm7fzo52a3vp.png" alt="" title="" /></p>

<p>With country/regions dependent working, what is happening with dragging that causes this issue?</p>
]]>
        </description>
    </item>
    <item>
        <title>ColReorder with column search</title>
        <link>https://next.datatables.net/forums/discussion/74462/colreorder-with-column-search</link>
        <pubDate>Thu, 27 Oct 2022 09:56:36 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>rf1234</dc:creator>
        <guid isPermaLink="false">74462@/forums/discussions</guid>
        <description><![CDATA[<p>I would like to use ColReorder jointly with column search. I checked the compatibility matrix and I should be ok because I don't use array data but columns.data.</p>

<p>My problem is:<br />
If I reorder columns the search field in the header of the column does not seem to move. But it should move jointly with the rest of the column of course!</p>

<p>This is the column search BEFORE reordering:<br />
<img src="https://datatables.net/forums/uploads/editor/53/36gmnlewrb1t.png" alt="" title="" /></p>

<p>And this is it AFTER reordering:<br />
<img src="https://datatables.net/forums/uploads/editor/j9/9rb8cg4mm2oo.png" alt="" title="" /></p>

<p><a href="https://next.datatables.net/forums/profile/kthorngren" rel="nofollow">@kthorngren</a><br />
Kevin, you should be an expert on this, I guess ... You helped me build this to make it work:</p>

<pre><code>initComplete: function () {
    if ( colSearchPage ) {
        //save the loaded state regarding column visibility
        var colArray = [];
        if ( stateSave ) {
            colArray = ctrTable.state().columns; 
        }
        //set all table columns to visible
        ctrTable.columns().visible( true );
        var table = this.api();
        $('.filterHead', table.table().header()).each( function (i) {
            var title = (lang === 'de' ? 'Suche ' : 'Search ') + $(this).text();
            var column = table.column(i);
            var throttledSearch = $.fn.dataTable.util.throttle(                        
                function (e) {
                    var code = e.which;
                // 8: backspace, 46: delete, 13: enter, 32: space, 
                // 59 or 186: semi-colon,
                // 188: comma, 189: dash or minus, 190: period
                    if ( code == 13 ) { //enter key
                        e.preventDefault();
                    }
                    var txt = $(this).val();
                    if ( txt.length &gt; 1 || code == 8 || code == 46 ) {
                        column
                            .search(txt)
                            .draw();
                    }
                },
                3000
            );
            $('&lt;input type="text" placeholder="'+title+'" class="text-muted"/&gt;')
                .appendTo( $(this).empty() )
                .on( 'keyup change', throttledSearch); 
        } ); 
        //restore the loaded state regarding column visibility
        $.each(colArray, function(key, value) {
            if ( ! value.visible ) {
                ctrTable.column(key).visible( false );
            }
        })
    }
},
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>ColReorder Original Index Option</title>
        <link>https://next.datatables.net/forums/discussion/73781/colreorder-original-index-option</link>
        <pubDate>Mon, 22 Aug 2022 18:32:00 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>chbocca</dc:creator>
        <guid isPermaLink="false">73781@/forums/discussions</guid>
        <description><![CDATA[<p>What is the syntax for specifying original index order option in the colReorder initialization?</p>

<p>I know the two-step method works:</p>

<pre><code>var table = $('#example').DataTable( {
    colReorder: true
} );

table.colReorder.order( [ 0, 1, 2, 3, 4, 5 ], true );
</code></pre>

<p>But I would like to do something like:</p>

<pre><code>var table = $('#example').DataTable( {
    colReorder: {
        enable: true,
        order:  [ 0, 1, 2, 3, 4, 5 ],
        original: true
    }
} );
</code></pre>

<p>If not possible, no big deal.</p>

<p>Thanks, as always!</p>
]]>
        </description>
    </item>
    <item>
        <title>Dragging column animation doesn't work in fullscreen mode</title>
        <link>https://next.datatables.net/forums/discussion/71495/dragging-column-animation-doesnt-work-in-fullscreen-mode</link>
        <pubDate>Thu, 03 Feb 2022 11:00:43 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>SMBE101</dc:creator>
        <guid isPermaLink="false">71495@/forums/discussions</guid>
        <description><![CDATA[<p>Hi everyone,<br />
I have the similar case like this:<br />
<a rel="nofollow" href="http://eplanosdesaude.com.br/datatables_colreorder.php" title="eplanosdesaude.com.br/datatables_colreorder.php">eplanosdesaude.com.br/datatables_colreorder.php</a><br />
In origin mode everything works fine, but in fullscreen there is no animatiion.<br />
How can I fix it?</p>
]]>
        </description>
    </item>
    <item>
        <title>Problem with colReorder and render function</title>
        <link>https://next.datatables.net/forums/discussion/71494/problem-with-colreorder-and-render-function</link>
        <pubDate>Thu, 03 Feb 2022 10:47:23 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>trongart</dc:creator>
        <guid isPermaLink="false">71494@/forums/discussions</guid>
        <description><![CDATA[<p>In <a rel="nofollow" href="http://live.datatables.net/jimarema/1/edit" title="this test case">this test case</a>, I use colReorder and the render function to check what is used for row[0] (please activate the console to see the results). After loading, row[0] is the Name column, but when I move the Name column to the right another column becomes row[0]. How can I keep the same Name column in the render function for row[0] while using colReorder?</p>
]]>
        </description>
    </item>
    <item>
        <title>Column-wise filter</title>
        <link>https://next.datatables.net/forums/discussion/71310/column-wise-filter</link>
        <pubDate>Fri, 21 Jan 2022 10:05:01 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>ralfeus</dc:creator>
        <guid isPermaLink="false">71310@/forums/discussions</guid>
        <description><![CDATA[<p>Hi all,<br />
I have a table with custom column-wise filter. It's defined like that:</p>

<pre><code>    &lt;table id="order_products" class="table"&gt;
        &lt;thead&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;/td&gt;
                &lt;td&gt;&lt;/td&gt;
                &lt;td&gt;&lt;input /&gt;&lt;/td&gt;
                &lt;td&gt;&lt;input /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;th&gt;&lt;/th&gt;
                &lt;th scope="col" style="width: 1em;"&gt;ID&lt;/th&gt;
                &lt;th scope="col" style="width: 1em;"&gt;Order ID&lt;/th&gt;
                &lt;th scope="col"&gt;Customer&lt;/th&gt;
            &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;&lt;/tbody&gt;
    &lt;/table&gt;
</code></pre>

<pre><code>    var table = $('#order_products').DataTable({
        dom: 'lrBtip',  
        ajax: {
            url: '/api/v1/admin/order/product',
            dataSrc: 'data'
        },
        columns: [
            {
                "className":      'details-control',
                "orderable":      false,
                "data":           null,
                "defaultContent": ''
            },
            {data: 'id'},
            {data: 'order_id'},
            {data: 'customer'}
      ],
        select: true,
        serverSide: true,
        processing: true,
        colReorder: true,
        initComplete: function() { init_search(this, g_filter_sources) }
    });

function init_search(table, filter_sources) {
    var promise = $.Deferred();
    var columns_left = table.api().columns().count();
    table.api().columns().every(function() { 
        column = this;
        $('td:nth-child(' + (this.index() + 1) + ') input', 
            $(this.header()).closest('thead'))
            .each((_idx, item) =&gt; init_search_input(item, column))
            .val('');
        columns_left--;
        if (!columns_left) {
            promise.resolve();
        }
    });
    return promise;
}

function init_search_input(target, column) {
    $(target).on('keyup change clear', function () {
        if ( column.search() !== this.value ) {
            column
                .search(this.value, false)
                .draw();
            // console.log(column.dataSrc(), this.value);
        }
    });
}
</code></pre>

<p>Filtering works fine until the moment I reorder columns. In this case there are two filterable columns: <code>order_id</code> and <code>customer</code>. If I swap them the filter inputs still work as they were on their original places.</p>

<p>I tried to add reorder event handler and reinitialize filtering like that:</p>

<pre><code>table.on('column-reorder', () =&gt; { init_search($('#order_products').dataTable(), g_filter_sources) });
</code></pre>

<p>but it didn't have any effect.</p>

<p>What could you suggest to overcome it?</p>
]]>
        </description>
    </item>
    <item>
        <title>Column Reordering Resets on New Column</title>
        <link>https://next.datatables.net/forums/discussion/71242/column-reordering-resets-on-new-column</link>
        <pubDate>Thu, 13 Jan 2022 22:28:08 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>jsosa</dc:creator>
        <guid isPermaLink="false">71242@/forums/discussions</guid>
        <description><![CDATA[<p>Hello, I'm using the colreorder extension to let users reorder their columns. When a new column is added to the table, or a column is removed, people's ordering of columns resets to the default table order.</p>

<p>Is there a way to make it so that a user's own column ordering does not reset if I add a new column at a later point?</p>

<p>Here's a basic example: <a rel="nofollow" href="http://live.datatables.net/vidiyabo/1/edit">http://live.datatables.net/vidiyabo/1/edit</a><br />
Ordering saves, but resets when I edit and add a new column.</p>

<p>Thanks!</p>
]]>
        </description>
    </item>
    <item>
        <title>Colreorder and table data structure</title>
        <link>https://next.datatables.net/forums/discussion/70873/colreorder-and-table-data-structure</link>
        <pubDate>Wed, 08 Dec 2021 14:47:53 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>zormi1000</dc:creator>
        <guid isPermaLink="false">70873@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Description of problem</strong>: Hi, I am loving datatables, first of all <img src="https://next.datatables.net/forums/resources/emoji/smile.png" title=":)" alt=":)" height="20" /> I have a question regarding data structure after drag &amp; drop with Colreorder plugin. On the screen you can see the change in column order when drag &amp; drop is completed but I cannot see the same change being applied to dt structure -&gt; column order is not changed as data source is not changed, I guess? I am using a charting api to visualize data and I want to push changed data order to charting service but I don't know how to get new column order?</p>
]]>
        </description>
    </item>
    <item>
        <title>The order of the data in the table different with the data that's retrieved from database</title>
        <link>https://next.datatables.net/forums/discussion/70520/the-order-of-the-data-in-the-table-different-with-the-data-thats-retrieved-from-database</link>
        <pubDate>Sat, 06 Nov 2021 10:43:14 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>fradi</dc:creator>
        <guid isPermaLink="false">70520@/forums/discussions</guid>
        <description><![CDATA[<p>I have a table, and i need to make them sorted descending. i tried to change the models of my code, and when i dump the data that's being retrieved from db, it's showed me this result:</p>

<p><img src="https://datatables.net/forums/uploads/editor/iy/oovdhopwgxnl.png" alt="" title="" /></p>

<p>You can see from the picture, it's sorted descending by the column of 'no_surat'. But, however, i didn't understand why but the table that's showed in the actual page is sorted ascending.</p>

<p><img src="https://datatables.net/forums/uploads/editor/cy/6bho1jc6vkhh.png" alt="" title="" /></p>

<p>Here's my code for my models:</p>

<p>public function get_surat_join()<br />
    {<br />
        return $this-&gt;db-&gt;table('tr_surat')<br />
            -&gt;join('ms_user', 'tr_surat.user_id=ms_user.user_id', 'left')<br />
            -&gt;join('ms_subbag', 'ms_user.id_subbag=ms_subbag.id_subbag', 'left')<br />
            -&gt;join('ms_bag', 'ms_user.id_bag=ms_bag.id_bag OR ms_subbag.id_bag=ms_bag.id_bag', 'left')<br />
            -&gt;join('ms_div', 'ms_user.id_div=ms_div.id_div OR ms_bag.id_div=ms_div.id_div', 'left')<br />
            -&gt;join('ms_akses', 'ms_user.id_akses=ms_akses.id_akses', 'left')<br />
            -&gt;join('tr_revisi', 'tr_surat.no_surat=tr_revisi.no_surat', 'left')<br />
            -&gt;join('(select r1.id_revisi, r1.tanggal_revisi, r1.no_surat from tr_revisi as r1 join (select max(id_revisi) id_revisi from tr_revisi group by no_surat) as r2 on r1.id_revisi=r2.id_revisi) as revisi', 'tr_surat.no_surat=revisi.no_surat', 'left')<br />
            -&gt;join('tr_surat as s', 's.no_surat=tr_surat.no_surat', 'left')<br />
            -&gt;groupBy('tr_surat.no_surat')<br />
            -&gt;orderBy('tr_surat.no_surat', 'DESC')<br />
            -&gt;get()-&gt;getResultArray();<br />
    }</p>

<p>Here's my code for my js script for the table:</p>

<p>$(document).ready(function() {<br />
    $('#table-surat-all').DataTable({<br />
        ordering:true,<br />
        "dom": '&lt;"toolbar"&gt;frtip',<br />
        "info": false,<br />
        "oLanguage": {<br />
            "sSearch": "Search"<br />
          }<br />
    });<br />
} );</p>

<p>I'll really hope you can help me, thank you</p>
]]>
        </description>
    </item>
    <item>
        <title>Does ColReorder support multiple-row table headers?</title>
        <link>https://next.datatables.net/forums/discussion/70425/does-colreorder-support-multiple-row-table-headers</link>
        <pubDate>Wed, 27 Oct 2021 20:12:34 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>tabletimes</dc:creator>
        <guid isPermaLink="false">70425@/forums/discussions</guid>
        <description><![CDATA[<p>jsfiddle with basic example: <a rel="nofollow" href="https://jsfiddle.net/bikz92/28qtaz9p/16/">https://jsfiddle.net/bikz92/28qtaz9p/16/</a></p>

<p>Hi folks - I recently discovered DataTables, and am really enjoying it. I switched to DataTables for the colreorder extension, so that I could re order columns on my table - so far, it's been great! The table I'd been using it on, had just a single &lt;tr&gt; tag within &lt;thead&gt;. However, today I tried to make another table, but  on my new table, my table header has a sub header (I mean, two &lt;tr&gt; tags within &lt;thead&gt; - the jsfiddle above shows the simple example). I noticed that the col reordering only applies to the lowest row in the table header (the sub columns). Is there a way to control this, so that only the top row is re-orderable? Or is this not currently possible?</p>

<p>Thanks so much in advance.</p>

<p>(P.S. I realize the jsfiddle is giving console errors from DataTables - locally, I am not receiving any errors, but I have DataTables downloaded locally, not sure what's the exact difference. Either way - the column re-ordering is happening in the jsfiddle, but just like it does locally, it only applies to the sub headers.)</p>
]]>
        </description>
    </item>
    <item>
        <title>Using colReorder with destroy()</title>
        <link>https://next.datatables.net/forums/discussion/70147/using-colreorder-with-destroy</link>
        <pubDate>Thu, 07 Oct 2021 00:18:18 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>tvaini</dc:creator>
        <guid isPermaLink="false">70147@/forums/discussions</guid>
        <description><![CDATA[<p>Hi there, it's me again having problems with colReorder()</p>

<p>On the first load, the dynamic table is complete generated, with the colReorder, and this works fine</p>

<p>But then I need to generate another dynamic table with another data, and I need to use the same table ID<br />
I call the DataTable().clear() and when I call DataTable.destroy(), it gives me an error like the one below</p>

<p>"Uncaught TypeError: Cannot read properties of null (reading 'dt')<br />
    at ColReorder._fnStateSave (dataTables.colReorder.js:853)"</p>

<p>If I don't call the destroy() method, I can't initialise another dynamic table using the same table ID...</p>

<p>Can someone help me please?</p>
]]>
        </description>
    </item>
    <item>
        <title>Hi, Is there a way I can use ColReorder to reorder even the responsive collapsed columns ?</title>
        <link>https://next.datatables.net/forums/discussion/68401/hi-is-there-a-way-i-can-use-colreorder-to-reorder-even-the-responsive-collapsed-columns</link>
        <pubDate>Fri, 21 May 2021 11:13:19 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>praveenb</dc:creator>
        <guid isPermaLink="false">68401@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>:</p>
]]>
        </description>
    </item>
    <item>
        <title>colReorder is not working</title>
        <link>https://next.datatables.net/forums/discussion/69940/colreorder-is-not-working</link>
        <pubDate>Wed, 22 Sep 2021 00:48:42 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>tvaini</dc:creator>
        <guid isPermaLink="false">69940@/forums/discussions</guid>
        <description><![CDATA[<p>Hi there, I'm facing a problem that colReorder is just not working<br />
I set "colReorder: true" to the $().DataTable() but it seems to take no effect<br />
When I call using new $.fn.dataTable.ColReorder( table, {} ); I get the error "Uncaught TypeError: $.fn.dataTable.ColReorder is not a constructor at..."</p>

<p>I'm using angular 9 and the package versions are<br />
"datatables": "^1.10.18",<br />
"datatables.net": "^1.11.2",<br />
"datatables.net-bs": "^1.11.2",<br />
"datatables.net-bs4": "^1.11.2",<br />
"datatables.net-colreorder": "^1.5.4",<br />
"datatables.net-colreorder-bs4": "^1.5.4"</p>

<p>Below is my DataTable() code</p>

<p><code>var _table = $('#datatable').DataTable(</code><br />
     <code>{</code><br />
<code>select: true,</code><br />
<code>colReorder: true,</code><br />
<code>}</code><br />
<code>});</code></p>

<p>Can someone please help me?</p>
]]>
        </description>
    </item>
    <item>
        <title>How do you change the Sort (rowReorder) colum from the first column to the last?</title>
        <link>https://next.datatables.net/forums/discussion/69806/how-do-you-change-the-sort-rowreorder-colum-from-the-first-column-to-the-last</link>
        <pubDate>Mon, 13 Sep 2021 15:44:18 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>koniahin</dc:creator>
        <guid isPermaLink="false">69806@/forums/discussions</guid>
        <description><![CDATA[<p>This seems simple enough. By default the Order/rowOrder field is attached to the first column, column0, I believe. I tried moving it to the last field and it fails. What happens is that the new last field named Sort or Order does nothing. The new first field (column0) still shows the drag/drop functionality if you click on an id but nothing actually changes.</p>

<p>Other than reordering the columns, if there another parameter which must be added to instruct drag/drop to link to the new position?</p>

<p>Demo at: <a rel="nofollow" href="https://www.dottedi.xyz/bin/notepad.php" title="https://www.dottedi.xyz/bin/notepad.php"></a><a rel="nofollow" href="https://www.dottedi.xyz/bin/notepad.php">https://www.dottedi.xyz/bin/notepad.php</a></p>

<p>The relevant parameters:</p>

<pre><code>    info: true,
    dom: 'Bfrtip',
    select: true,
    order: [ 0, "asc" ], /* Not to be confused with rowOrder, this only changes the default initial sort column. */
    rowReorder: { dataSrc: 'notes.rowOrder', editor:  editor },
</code></pre>

<p>The columns:</p>

<pre><code>    columns: [
      // { data: 'notes.rowOrder', className: 'reorder' },
      { data: 'notes.id'},
      { data: 'notes.title' },
      { data: 'notes.date' },
      { data: 'note_categories.name' },
      { data: 'notes.summary' },
      { data: 'notes.rowOrder', className: 'reorder' },
    ]
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Sorting problem</title>
        <link>https://next.datatables.net/forums/discussion/69751/sorting-problem</link>
        <pubDate>Thu, 09 Sep 2021 14:19:58 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>EmyB</dc:creator>
        <guid isPermaLink="false">69751@/forums/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I have a problem with your extension, let me explain:</p>

<p>I have a table that contains several columns, one of which has numbers, when I want to sort this column by ascending numbers, it does not work well,</p>

<p>I get this problem for the column "Capacité théorique/heure", sur mon site <a rel="nofollow" href="https://www.hopstockagromecanique.fr/">https://www.hopstockagromecanique.fr/</a></p>

<p>Can you help me? Do you have a code to use to replace this way of processing?</p>

<p>Thank you,</p>
]]>
        </description>
    </item>
    <item>
        <title>How to Force columns data type in order to reorder correctly</title>
        <link>https://next.datatables.net/forums/discussion/69680/how-to-force-columns-data-type-in-order-to-reorder-correctly</link>
        <pubDate>Fri, 03 Sep 2021 12:15:04 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>Filipe_Apostolo</dc:creator>
        <guid isPermaLink="false">69680@/forums/discussions</guid>
        <description><![CDATA[<p>Hi to all,<br />
I tried recently this datatables.js and I immediately get in love with it, congrats to developers!!!</p>

<p>I am creating a performance table of my co-workers, the intent is to keep track of their work and understand our overall efforts.</p>

<p>The efforts are showed by current month totals / total year<br />
So in the first column I put the name and the other columns have their efforts indicators. Here goes an example</p>

<p>NAME  | Visits realized |  Opportunities Created | Projects Conluded<br />
Jhon S |      10/ 300       |           2/44                  |1/25</p>

<p>again: 10/300 means 10 this month and 300 in the current year.</p>

<p>Problem:<br />
When I try to reorder by column it does not order by the number at left of the slash, it seems that it is somehow considering the data as a  date I try to change the / by an # and the result is the same<br />
<img src="https://datatables.net/forums/uploads/editor/ed/070z6fpdj7ur.png" alt="" title="" /></p>

<p>How can I force to be interpreted as a String instead of date, or witch is the prettiest way to present this type of information</p>

<p>Thanks in advance!!</p>
]]>
        </description>
    </item>
    <item>
        <title>I am not able to do colReorder with individual column filter on server side .</title>
        <link>https://next.datatables.net/forums/discussion/68858/i-am-not-able-to-do-colreorder-with-individual-column-filter-on-server-side</link>
        <pubDate>Sat, 26 Jun 2021 01:32:54 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>shunottara17</dc:creator>
        <guid isPermaLink="false">68858@/forums/discussions</guid>
        <description><![CDATA[<p>When I am doing colReordering on server side with individual column filter i need to do reload every time and also column referring its old index. Please help me</p>
]]>
        </description>
    </item>
    <item>
        <title>Ordering from right to left?</title>
        <link>https://next.datatables.net/forums/discussion/68739/ordering-from-right-to-left</link>
        <pubDate>Thu, 17 Jun 2021 08:47:24 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>RedDog85</dc:creator>
        <guid isPermaLink="false">68739@/forums/discussions</guid>
        <description><![CDATA[<p>I'm currently using HubSpot to display a lot of data in a table across 13 columns. Using DataTables I am able to order this data based on the 13th column which works perfectly.</p>

<p>"order": [[ 12, 'asc' ]]  /* columns from left to right starting at 0 */</p>

<p>However, as this module is reused across many pages on my website, I've written a condition which hides the first column if you're on a particular page, meaning that you may only see 12 columns - breaking the order value.</p>

<p>Is there a way to reverse the order to read right to left so my 13th column becomes 0?</p>
]]>
        </description>
    </item>
    <item>
        <title>colReorder, createdCell and ajax in react</title>
        <link>https://next.datatables.net/forums/discussion/68569/colreorder-createdcell-and-ajax-in-react</link>
        <pubDate>Fri, 04 Jun 2021 22:52:18 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>percyquilla</dc:creator>
        <guid isPermaLink="false">68569@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, I'm using React and I have some problems with colReorder, what happens is that the button is lost when using <strong>colReorder</strong>, example here: <a rel="nofollow" href="https://jsfiddle.net/15sjw3cz/47/">https://jsfiddle.net/15sjw3cz/47/</a><br />
help please.<br />
I render the button from createdCell, it only happens when I use ajax (in the example the constant <strong>data</strong> simulates the response of an API)</p>
]]>
        </description>
    </item>
    <item>
        <title>Predefined order not works.</title>
        <link>https://next.datatables.net/forums/discussion/68573/predefined-order-not-works</link>
        <pubDate>Sat, 05 Jun 2021 06:39:57 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>mkpanchal</dc:creator>
        <guid isPermaLink="false">68573@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<a rel="nofollow" href="http://demo.caseclosed.cloud">http://demo.caseclosed.cloud</a><br />
Login : info@appuno.co<br />
Pwd : P@ssw0rd<br />
Navigate to Module -&gt; Case<br />
In this i have used it same.<br />
<strong>Debugger code (debug.datatables.net)</strong>:</p>

<pre><code>$("#caseMainTable").DataTable({
                "fnRowCallback": function (nRow, data, iDisplayIndex, iDisplayIndexFull) {
                    if (data.IsRead == false)
                    {
                        $('td', nRow).css('color', 'orangered');
                    }
                },
                "responsive": true,
                "destroy": true,
                "processing": true,
                "colReorder": { order: [6,1,2,3,4,5,0,7,8,9,10] },
                "serverSide": true,
                "order": [[3, "desc"]],
                "lengthMenu": [
                    [10, 25, 50, 100, -1],
                    ['10 rows', '25 rows', '50 rows', '100 rows', 'Show all']
                ],
                "dom": 'Bfrtip',
                "buttons": ['pageLength',
                    {
                        extend: 'excelHtml5',
                        autoFilter: true,
                        sheetName: 'Exported data',
                        exportOptions: {
                            columns: ':visible'
                        }
                    }],
                "columnDefs": [
                    { responsivePriority: 1, targets: 0 },
                    { responsivePriority: 2, targets: [-1,-2,-3] },
                    { targets: -1, className: 'text-center align-middle' },
                    {
                        targets: '_all',
                        render: $.fn.dataTable.render.ellipsis(20, true, false)
                    }
                ],
                "ajax": $.fn.dataTable.pipeline({
                    "url": "/Case/loadCaseGrid",
                    "data": {
                        caseStatus: ischk,
                        region: regionv,
                        type: typev,
                        subtype: subtypev,
                        agent: Agentv,
                        caseActive: active,
                        caseInactive: inactive,
                        caseDel: isdel,
                        AppCase: isApp,
                        UnAppCase: isUnApp,
                        PendCase: isPnApp
                    },
                    "cache": false,
                    "type": "POST",
                    "datatype": "json"
                }),
                "columns": [
                    {
                        "title":'Approved ?',
                        "data": "IsApproved",
                        "visible":true,
                        "searchable": false,
                        "sortable": false,
                        "render": function (data, type, full, meta) {
                            if (data == "Approved") {
                                return '&lt;span title="Approved"&gt;&lt;i class="fa fa-thumbs-up" style="color:#227e77"&gt;&lt;/i&gt;&lt;/span&gt;';
                            }
                            else if (data == "Disapprove") {
                                return '&lt;span title="Disapproved"&gt;&lt;i class="fa fa-thumbs-down"  style="color:#ef5350"&gt;&lt;/i&gt;&lt;/span&gt;';
                            }
                            else {
                                return '&lt;span title="Pending"&gt;&lt;i class="fa fa-exclamation-circle" style="color:#d39e00"&gt;&lt;/i&gt;&lt;/span&gt;';
                            }
                        }
                    },
                    { "title":'Case #', "data": "caseNumber", "autoWidth": true,"visible":true, },
                    { "title":'Description', "data": "caseDescription", "autoWidth": true,"visible":true, },
                    {
                        "title":'Register Date',
                        "data": "caseOpenDate",
                        "visible":true,
                        "autoWidth": true,
                        "render": function (data, type, row) {
                                if (data == null) {
                                    return "";
                                }
                                if (type === 'display' || type === 'filter') {
                                    return (moment.utc(data).format("DD-MMM-YYYY"));
                                }
                                return data;
                            }
                    },
                    { "title":'Status', "data": "status", "autoWidth": true,"visible":true, },
                    { "title":'Type', "data": "type", "autoWidth": true,"visible":true, },
                    { "title":'Sub Type', "data": "subType", "autoWidth": true,"visible":true, },
                    { "title": 'Region', "data": "CaseRegion", "autoWidth": true,"visible":true, },
                    { "title": 'Stage', "data": "Stage", "autoWidth": true,"visible":true, },
                    { "title": 'Original Complaint', "data": "OriginalComplaint", "autoWidth": true,"visible":true, },
                    { "title":'Assign To Agents', "data": "AssignAgent", "autoWidth": true,"visible":true, },
                    {
                        "title": "Action",
                        "searchable": false,
                        "sortable": false,
                        "data": null,
                        "render": function (data, type, full, meta) {
                            var status = full.status;
                            var Perm = '&lt;a href="#" onclick="DownloadCase(\'' + full["caseId"] + '\')" title="Download"&gt; &lt;i class="fas fa-download" style="color:#227e77;font-size:1.5em"&gt;&lt;/i&gt;&lt;/a&gt;';
                            Perm += '&lt;a href="#" onclick="ConverttoPdf(\'' + full["caseId"] + '\' )" title="PDF"&gt; &lt;i class="far fa-file-pdf" style="color:red;font-size:1.5em"&gt;&lt;/i&gt; &lt;/a&gt;';
                            if ('True' == "True" &amp;&amp; full["IsDeleted"] == "0") {
                                Perm += '&lt;a href="#" onclick="DelCase(0,\'' + full["caseId"] + '\')" title="Recover"&gt; &lt;i class="far fa-trash-restore" style="color:#227e77;font-size:1.5em"&gt;&lt;/i&gt; &lt;/a&gt;';
                            }
                            else {
                                if ('True' == "True")
                                {
                                    Perm += '&lt;a href="#" onclick="ConverttoPdf(\'' + full["caseId"] + '\')" title="PDF"&gt;&lt;/a&gt;';
                                }
                                if ('True' == "True")
                                {
                                    if (status == "Closed")
                                    {
                                        if('True' == "True")
                                        {
                                            Perm += '&lt;a href="#" onclick="AddEditCase(\'' + full["caseId"] + '\')"  title="Open"&gt; &lt;i class="far fa-edit" style="color:#227e77;font-size:1.5em"&gt;&lt;/i&gt; &lt;/a&gt;';
                                        }
                                    }
                                    else
                                    {
                                        Perm += '&lt;a href="#" onclick="AddEditCase(\'' + full["caseId"] + '\')"  title="Open"&gt; &lt;i class="far fa-edit" style="color:#227e77;font-size:1.5em"&gt;&lt;/i&gt; &lt;/a&gt;';
                                        Perm += '&lt;a href="#" onclick="RelCase(\'' + full["caseId"] + '\')" title="Related Case"&gt; &lt;i class="fas fa-retweet" style="color:#227e77;font-size:1.5em"&gt;&lt;/i&gt; &lt;/a&gt;';
                                    }
                                }
                                if ('True' == "True" &amp;&amp; full["IsDeleted"] == "1")
                                {
                                    Perm += '&lt;a href="#" onclick="DelCase(1,\'' + full["caseId"] + '\')" title="Delete"&gt; &lt;i class="far fa-trash-alt" style="color:red;font-size:1.5em"&gt;&lt;/i&gt; &lt;/a&gt;' ;
                                }
                                Perm += '&lt;a href="#" onclick="RemoteReview(\'' + full["caseId"] + '\')" title="Remote Review"&gt; &lt;i class="fa fa-link" style="color:yellowgreen;font-size:1.5em"&gt;&lt;/i&gt; &lt;/a&gt;';
                            }
                            return Perm;
                        }
                    }
                ]
        })
</code></pre>

<p><strong>Error messages shown</strong>:<br />
No<br />
<strong>Description of problem</strong>:<br />
I have set the column predefined order but it display the standard order.</p>

<blockquote>
  <p><strong>Edited by Colin</strong> - Syntax highlighting. Details on how to highlight code using markdown can be <a rel="nofollow" href="/manual/tech-notes/8#Code">found in this guide</a>.</p>
</blockquote>
]]>
        </description>
    </item>
    <item>
        <title>Reordering of columns invalidates data. Can I prevent this?</title>
        <link>https://next.datatables.net/forums/discussion/68363/reordering-of-columns-invalidates-data-can-i-prevent-this</link>
        <pubDate>Wed, 19 May 2021 13:05:08 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>Thebrath</dc:creator>
        <guid isPermaLink="false">68363@/forums/discussions</guid>
        <description><![CDATA[<p>I am using DataTables the way it is shown in your example for Colreorder “basic initialization” <a rel="nofollow" href="https://datatables.net/extensions/colreorder/examples/initialisation/simple.html" title="https://datatables.net/extensions/colreorder/examples/initialisation/simple.html"></a><a rel="nofollow" href="https://datatables.net/extensions/colreorder/examples/initialisation/simple.html">https://datatables.net/extensions/colreorder/examples/initialisation/simple.html</a>. The data is DOM sourced and colReorder is set to true. In addition I render the display for Date columns to a localized format. So the date columns will differ from the initial value after rendering.</p>

<p><code>$('#example').DataTable().data()</code> gives this values:</p>

<p><img src="https://datatables.net/forums/uploads/editor/6h/vfwz5yoyfp2i.png" alt="" title="" /></p>

<p>And the display data could look like that:</p>

<p><img src="https://datatables.net/forums/uploads/editor/1z/s5qj17vpzah4.png" alt="" title="" /></p>

<p>After reordering of any column the internal data will be invalidated and again loaded from the DOM. So the internal data will look like that:</p>

<p><img src="https://datatables.net/forums/uploads/editor/87/uyi1ytqc0apk.png" alt="" title="" /></p>

<p>The next time the date column gets rendered (e.g. for sorting) it will not work correctly. I don’ t know how to prevent this behavior without copying the original data before rendering it. I would like to avoid this overhead.</p>

<p>I tried to check why the data is reloaded after the column was moved. As far as I can tell, the function <code>$.fn.dataTableExt.oApi.fnColReorder</code> has the 4th parameter <code>invalidateRows</code>. And if this parameter is not set the data will be invalidated:<br />
<code>if ( invalidateRows || invalidateRows === undefined )</code>
<code>{</code>
<code>$.fn.dataTable.Api( oSettings ).rows().invalidate();</code>
<code>}</code></p>

<p>The mouse move event does not provide this parameter. If the colReorder is triggered from the API with the 4th parameter set to false everything works fine.</p>

<p>This will work:<br />
<code>$('#example').DataTable().colReorder.move( 2, 3, true, false );</code></p>

<p>This will invalidate the data (same like column moved by mouse):<br />
<code>$('#example').DataTable().colReorder.move( 2, 3);</code></p>

<p>Do I need to change my existing apps for sorting after column reorder to work? Or is there a better way to do this?</p>

<p>Thanks for your help</p>
]]>
        </description>
    </item>
    <item>
        <title>Is it possible to use ColReorder in conjunction with footerCallBack?</title>
        <link>https://next.datatables.net/forums/discussion/68404/is-it-possible-to-use-colreorder-in-conjunction-with-footercallback</link>
        <pubDate>Fri, 21 May 2021 14:42:07 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>WillianRoby</dc:creator>
        <guid isPermaLink="false">68404@/forums/discussions</guid>
        <description><![CDATA[<p>In a table, I have the footerCallBack added, but after starting to use ColReorder, report this error on the console: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'.</p>

<p>I've been researching the error and I verified that it is because the footerCallBack generates a "colspan" and with colspan it is not possible to use ColReorder.</p>

<p>Is it already possible to solve this problem?</p>
]]>
        </description>
    </item>
    <item>
        <title>using Col-Reorder with large amount of data -performance issue</title>
        <link>https://next.datatables.net/forums/discussion/68183/using-col-reorder-with-large-amount-of-data-performance-issue</link>
        <pubDate>Mon, 03 May 2021 08:09:04 +0000</pubDate>
        <category>ColReorder</category>
        <dc:creator>Pavan_05</dc:creator>
        <guid isPermaLink="false">68183@/forums/discussions</guid>
        <description><![CDATA[<p>Hi ,<br />
  I am having an issue while loading Table with more than 100 columns,<br />
 if i use col reorder with more columns in a table ,page becomes not responsive  and very slow</p>

<p>Thanks,<br />
Pavan</p>
]]>
        </description>
    </item>
   </channel>
</rss>
