"Selected" button not working in example

"Selected" button not working in example

enboigenboig Posts: 5Questions: 2Answers: 1

I was trying to use selected button but the example isn't working. It don't throw an error, checked with firefox and chrome.

https://datatables.net/extensions/select/examples/initialisation/buttons.html

By the way, should it work with ajax?

Answers

  • colincolin Posts: 15,146Questions: 1Answers: 2,587

    It's working as expected :)

    selected doesn't do anything as such, but you'll noticed it only becomes enabled when rows are selected. As you can see on that reference page, you can then extend that button to do things on those selected rows (in the reference page it's just printing the indexes). It just gives you a starting point for a button that you want to customise when the user has selected something. selectedSingle is similar, but it only enables when a single row is selected, not multile,

    Colin

  • enboigenboig Posts: 5Questions: 2Answers: 1

    It wasn't what I expected ;-)

    I expected to show only selected rows when clicked; so if you check few rows on page 1, 3, ... you have a way to see all selected rows together before submitting them.

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    The (relatively) recently added showSelected will show only the selected rows when clicked on.

    Allan

Sign In or Register to comment.