Collection buttons are not working with multi rows selects!
Collection buttons are not working with multi rows selects!
jurikobe
Posts: 7Questions: 0Answers: 0
[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?
"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?
This discussion has been closed.
Replies
btw - the "print" option will currently ignore the bSelectedOnly parameter - that isn't implemented yet.
Allan
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