ColVis button displayed in oTableTools aButtons?

ColVis button displayed in oTableTools aButtons?

semseosemseo Posts: 9Questions: 0Answers: 0
edited June 2012 in General
I am trying to display the ColVis button with the rest of the buttons in "oTableTools": { "aButtons":

I have added this code but it does not work. I just need to know how to initialise ColVis. This code gives error "oDTSettings is not defined". Any help is appreciated.

{"sExtends": "text",
"sButtonText": "Show/Hide Cols",
"fnClick": function ( nButton, oConfig, oFlash ) {
new ColVis( oDTSettings, init );
}
},

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    What you've got at the moment is creating a new instance of ColVis every time you click on the button, so that's not going to work :-).

    Currently there is actually no way of having ColVis's button appear in the TableTools output, other than to manipulate the DOM manually once the initialisation as completed.

    The long term plan is to integrate ColVis directly into TableTools and do away with the separate plug-in, but I suspect that's a good bit into the future with all the other plans for DataTables still to do as well :-)

    Allan
  • semseosemseo Posts: 9Questions: 0Answers: 0
    Thanks Allan. I think it will look better when integrated but it is not a priority.
  • pearlpearl Posts: 1Questions: 0Answers: 0
    Hi Allan,

    Is there a way to manipulate ColVis once the table is rendered. Like change dynamically the values according to other values ouside DOM ?
This discussion has been closed.