Combining ColReorder and ColVis together?

Combining ColReorder and ColVis together?

KyvuKyvu Posts: 11Questions: 0Answers: 0
edited April 2012 in Plug-ins
Hello everybody,

I am trying to use ColReorder and ColVis plug-ins in the same table but something is wrong.

First try:

[code]
$('#my').dataTable({
"aaSorting": [],
"sScrollY": "400px",
"bPaginate": false,
"bScrollCollapse": true,
"sDom": 'C<"clear">lfrtip',
"sDom": 'Rlfrtip'
});
[/code]

Second try:

[code]
$('#my').dataTable({
"aaSorting": [],
"sScrollY": "400px",
"bPaginate": false,
"bScrollCollapse": true,
"sDom": {'C<"clear">lfrtip', 'Rlfrtip'}
});
[/code]

Is it possible to integrate these two plug-ins together?

Thanks.

Regards.

Replies

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    Try:

    [code]
    $('#my').dataTable({
    "aaSorting": [],
    "sScrollY": "400px",
    "bPaginate": false,
    "bScrollCollapse": true,
    "sDom": 'RC<"clear">lfrtip'
    });
    [/code]

    like in this example: http://datatables.net/release-datatables/extras/ColReorder/colvis.html .

    Each letter in sDom is a feature, so to add features you just add letters to the string.

    Allan
  • KyvuKyvu Posts: 11Questions: 0Answers: 0
    Ok, it works!

    Thank you, Allan.
This discussion has been closed.