How to set the active state when a button is clicked in the "column groups" example?

How to set the active state when a button is clicked in the "column groups" example?

bilyejdbilyejd Posts: 6Questions: 4Answers: 0

I would like to set the active state when a button is clicked in the Column Groups example, and unset the active state for the other buttons. I have created a JSFiddle with my attempt to solve the problem. Unfortunately my code seems to toggle all the buttons, instead of only the one I click. If one button is clicked twice, the active state is deselected when it should remain selected.

Thanks

Answers

  • erik2991erik2991 Posts: 1Questions: 0Answers: 0
    edited January 2017

    bilyejd, everything in your code is right, except, that the true and false within the dTable.button(0).active('true'); has to be written without '-sign, i.e. dTable.button(0).active(true); once you remove the '-sign, everything works fine.

This discussion has been closed.