Buttons - colvis column selector not working?

Buttons - colvis column selector not working?

DoctorDoctor Posts: 7Questions: 3Answers: 0
edited November 2015 in Free community support

I have an issue where I have tried to use a column selector (in this case, ':not(.classname)') for the colvis Buttons extension but it does nothing. However, I use the exact same column selector for the export options and it works fine.

Not working:
{extend: 'colvis', columns: ':not(.classname)'}

Working:
{extend: 'excel', exportOptions: {columns: ':not(.classname)'}}

Unfortunately it means I have to revert to having an array of column indexes to pick which columns show in the pop-up, which is not as tidy!

Is there a difference between the column selector implementation on these two extensions?

Answers

  • DoctorDoctor Posts: 7Questions: 3Answers: 0

    Here's an example showing the issue. Note that it does work if I use a simple HTML DOM example, so it could be due to the class name being added after the initialisation.

    https://jsfiddle.net/f7jnfbk2/

  • DoctorDoctor Posts: 7Questions: 3Answers: 0

    Does anyone know why this does not work? Is it because the CSS class is being set in the column definitions, which works with export but not colvis??

This discussion has been closed.