Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82006

Table width when redrawing

$
0
0
Hi Allan

I now have a really great implementation of datatables which is doing nearly everything I need. One of the things it does is allow the user to add and remove columns dynamically. If the user selects a large number and gets a horizontal scrollbar that's fine. However, if they then remove columns the table stays the same width. I am calling fnDraw once done, here is the code. Can you let me know how to get the table to shrink to the correct width please?

    var updateColumns = function ()
    {
        $('input.columnSelector[type=checkbox]').each(function (){
            var iCol = findColumnNumber($(this).attr('id').substring(6, $(this).attr('id').length));
            oTable.fnSetColumnVis( iCol, $(this).is(':checked'));  
        });
        oTable.fnDraw();
    }

Viewing all articles
Browse latest Browse all 82006

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>