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

Hi

This is a very useful tool. Today I've tried to use fixedcolumns + colvis following this example:
https://datatables.net/release-datatables/extensions/FixedColumns/examples/colvis.html

my issue is this:
1. when I open my table, it looks misaligned with the rest of the content and fixedcolumns does not work (https://www.dropbox.com/s/ihw5c410xouuskt/Screen%20Shot%202015-01-03%20at%202.35.21%20PM.png?dl=0)
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 (https://www.dropbox.com/s/l17608ipowq25ff/Screen%20Shot%202015-01-03%20at%202.37.31%20PM.png?dl=0)

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.