PLEASE HELP! Why is ColVis button disappearing when I add tabletools button?
PLEASE HELP! Why is ColVis button disappearing when I add tabletools button?
Hi all I am wondering how can I have ColVis option and TableTools buttons defined on the same table?
This is my code
[code]
$('#jphit').dataTable( {
"sDom": 'C<"clear">lfrtip',
"sDom": 'T<"clear">lfrtip',
"oColVis": {
"buttonText": "Extend table",
"activate": "mouseover"
},
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [ 0 ] }
],
"bProcessing": true,
"bServerSide": true,
"sScrollY": "350px",
"bDeferRender": true,
"sAjaxSource": "increment_table.php"
} );
[/code]
This is my code
[code]
$('#jphit').dataTable( {
"sDom": 'C<"clear">lfrtip',
"sDom": 'T<"clear">lfrtip',
"oColVis": {
"buttonText": "Extend table",
"activate": "mouseover"
},
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [ 0 ] }
],
"bProcessing": true,
"bServerSide": true,
"sScrollY": "350px",
"bDeferRender": true,
"sAjaxSource": "increment_table.php"
} );
[/code]
This discussion has been closed.
Replies
If I gave you the Javascript object:
[code]
{
"a": 1,
"a": 2
}
[/code]
and then ask what the value of the property "a" is - what is it - 1 or 2? :-)
The letters in the sDom string a features (see the documentation for sDom for the defaults). The plug-ins add extra letters to the options -'C' for ColVis, 'T' for TableTools - so just include them both.
Allan