Adding Colvis to Bootstrap4 Drop-down does not work.

Adding Colvis to Bootstrap4 Drop-down does not work.

bchiprebchipre Posts: 30Questions: 10Answers: 0

I tried adding colvis using the latest Nightly CDN's to a bootstrap 4 dropdown menu, While all other options like Print, Copy, PDF, CSV, Excel works perfectly, Colvis is never triggered although it has detach().
This is what I tried : http://live.datatables.net/nosajori/1/edit

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,189Questions: 1Answers: 10,411 Site admin
    Answer ✓

    Rather than using your own Buttons to trigger the actions of our buttons, I'd suggest just using our buttons - you can nest level like you are trying to do: http://live.datatables.net/nosajori/4/edit .

    Allan

  • bchiprebchipre Posts: 30Questions: 10Answers: 0
    edited November 2019

    Thanks @allan. This worked as a charm. The reason to use my own Buttons was that I have one more option in the drop-down to export my complete MySQL database using 'form'. But I am unable to add a custom button to the solution you provided above to get my db exported. Still stuck.
    If you want to have a look, I will email you the issue.

  • bchiprebchipre Posts: 30Questions: 10Answers: 0

    Yupiee !

    Just used this option using custom button to export my db, and it works perfectly along with solution you provided above. Datatable rocks !

    buttons: [
        {
          text: 'Link Button',
          action: function ( e, dt, button, config ) {
            window.location = 'linkpage.php';
          }        
        }
    ]
    
  • allanallan Posts: 63,189Questions: 1Answers: 10,411 Site admin
    Answer ✓

    Great to hear - thanks for letting us know!

    Allan

  • bchiprebchipre Posts: 30Questions: 10Answers: 0

    Thank you too @allan.

This discussion has been closed.