ColVis + FixedColumns issue. May I have some help?

ColVis + FixedColumns issue. May I have some help?

pachamaltesepachamaltese Posts: 2Questions: 1Answers: 0
edited January 2015 in Free community support


This is a very useful tool. Today I've tried to use fixedcolumns + colvis following this example:

my issue is this:
1. when I open my table, it looks misaligned with the rest of the content and fixedcolumns does not work (
2. I did some test, and if I click the colvis button to hide a column, then the table is re-drawn, appears properly aligned and fixedcolumns works for the first 3 columns as I wanted (

may I obtain some suggestions, I've used this:

<script type="text/javascript" class="init"> $(document).ready(function() { var table = $('#tabla-conectividad-1').DataTable( { scrollY: "300px", scrollX: true, scrollCollapse: true, paging: false, info: false, dom: 'C<"clear">lfrtip', colVis: { exclude: [ 0,1,2 ], "showAll": "</br><b>Mostrar todo</b></br>", "showNone": "</br><b>Ocultar todo</b></br>" } } ); new $.fn.dataTable.FixedColumns( table, { leftColumns: 2 } ); } ); </script>

if I remove these lines:

new $.fn.dataTable.FixedColumns( table, { leftColumns: 2 } ); } );

then everything looks nice when I open my table but (obviously) fixedcolumns goes disabled

many thanks in advance

M Vargas
Trainee at Fundación SOL

This discussion has been closed.