In my current datatables I use this:
[code]"sDom":'<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>',[/code]
But I need to add button for ColVis plugin.
It seems like I need to change
sDom like this:
[code]"sDom": 'C<"clear">lfrtip'[/code]
How can I combine my current
sDom and ColVis sDom?
Thank you
Replies
Allan
[code]pagination = "full_numbers";
aoColumnDefs = [
{ "sType":"title-numeric", "aTargets":[ 3 ] },
{ "sType":"title-numeric", "aTargets":[ 7 ] },
{ "bSortable":false, "aTargets":[ 0 ] },
{ "bSortable":false, "aTargets":[ 8 ] },
{ "bSortable":false, "aTargets":[ 9 ] },
{ "sClass":"center", "aTargets":[ 2, 3, 4, 5, 6, 7 ] }
];
defaultSort = [[ 7, "desc" ]];
$('#myTable').dataTable(
{
"aoColumnDefs":aoColumnDefs,
"sPaginationType": pagination,
"aaSorting": defaultSort,
"bPaginate":true,
"sDom":'<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>',
"fnDrawCallback": function () { updateTableFuncts() },
"iDisplayLength":25,
"aLengthMenu": [[10, 25, 50], [10, 25, 50]],
}
);[/code]
Changing sDom from
[code]"sDom":'<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>',[/code]
to
[code]"sDom":'C<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>',[/code]
didn't change anything.
Does something conflicts and block ColVis button ?
Thank you.
Allan
http://live.datatables.net/azucem/9/
I changed sDom to see ColVis, but didn't appear.
Allan
I understand that after your last comment :)
http://datatables.net/releases/ColVis-1.0.8.zip
http://live.datatables.net/azucem/14
I can see "Show/Hide columns" button but clicking the button and checking out column names doesn't affect on columns. Should I make anything more?
Allan