Is it possible to combine ColVis with ColReorder?

Is it possible to combine ColVis with ColReorder?

Tudor87Tudor87 Posts: 9Questions: 0Answers: 0
edited March 2014 in Plug-ins
The follwing code has the plugins installed but the problem is that ColReorder doesn't work when I try to put the ColVis. Autofill works all the time.

Thanks!

[code]
$(document).ready( function () {
var oTable = $('#example').dataTable( {
"sDom": 'Rlfrtip',
"sDom": 'C<"clear">lfrtip'
} );
new AutoFill( oTable );
} );
[/code]

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    [code]
    $(document).ready( function () {
    var oTable = $('#example').dataTable( {
    "sDom": 'C<"clear">Rlfrtip',
    } );
    new AutoFill( oTable );
    } );
    [/code]

    Doing it like you had is like saying `var i=1; i=2;` and expecting `i` to be both 1 and 2 :-)

    Allan
  • Tudor87Tudor87 Posts: 9Questions: 0Answers: 0
    Thanks a lot Allan, I figure it out that sDom needs to be used within the same parameter initialization.
  • Tudor87Tudor87 Posts: 9Questions: 0Answers: 0
    I found that if I want to create a collection of export buttons and to create a custom message within my pdf I must follow the "separation rule". I can't combine them like the sDom. I started to enjoy DataTable, slowly, slowly. In the beginning it was the most sensitive thing that I've ever seen. A single character to be changed and your Table would "explode"...

    [code]
    {
    "sExtends": "collection",
    "sButtonText": 'Save ',
    "aButtons": [ "csv", "xls", "pdf" ]
    },
    {
    "sExtends": "pdf",
    "sPdfOrientation": "landscape",
    "sPdfMessage": "The table was generated with DataTable"
    [/code]
This discussion has been closed.