Collection buttons are not working with multi rows selects!

Collection buttons are not working with multi rows selects!

jurikobejurikobe Posts: 7Questions: 0Answers: 0
edited March 2012 in TableTools
[code]
"oTableTools": {
"sSwfPath": "../../lib/js/jquery.dataTables/extras/TableTools/media/swf/copy_cvs_xls_pdf.swf",
"sRowSelect": "multi",
"aButtons": [
"select_all",
"select_none",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf", "copy" ],
"bSelectedOnly": "true"
},
{
"sExtends": "print",
"sButtonText": "Print",
"bSelectedOnly": "true"
}
]
}
[/code]

This configuration does show buttons, but non of them are working as expected! '0 rows copied' etc.
Anybody got any idea why?

Replies

  • adsoodadsood Posts: 10Questions: 0Answers: 0
    Does the browser support and allow flash plug-ins?
  • jurikobejurikobe Posts: 7Questions: 0Answers: 0
    edited March 2012
    Ofcourse it is! Single buttons + multi rows table tools = working solution, but collection is not.
  • allanallan Posts: 61,864Questions: 1Answers: 10,136 Site admin
    It appears to work okay here: http://datatables.net/release-datatables/extras/TableTools/collection.html - can you link us to a page showing the issue please?

    btw - the "print" option will currently ignore the bSelectedOnly parameter - that isn't implemented yet.

    Allan
  • jurikobejurikobe Posts: 7Questions: 0Answers: 0
    Allan, your link does not have MULTI rows selection func turned on. Can you please check it with this feature?
  • allanallan Posts: 61,864Questions: 1Answers: 10,136 Site admin
    Oh I see what you mean!

    The button options are not cascading! So applied a property to your collection does not mean it will apply to the buttons in the collection. You would do something like this:

    [code]
    "aButtons": [
    "select_all",
    "select_none",
    {
    "sExtends": "collection",
    "sButtonText": "Save",
    "aButtons": [ {
    "sExtends": "csv",
    "bSelectedOnly": true
    }, ... ]
    },
    {
    "sExtends": "print",
    "sButtonText": "Print"
    }
    ]
    }
    [/code]

    btw - note that bSelectedOnly is a boolean value not a string, so give it true or false without quotes.

    Allan
  • jurikobejurikobe Posts: 7Questions: 0Answers: 0
    Thnx! Now it's working like a charm! Chears!
This discussion has been closed.