bSelectedOnly not behaving?

bSelectedOnly not behaving?

nickyoonnickyoon Posts: 1Questions: 0Answers: 0
edited June 2011 in TableTools
Hi Allan,

Referring to the discussion you had on http://datatables.net/forums/comments.php?DiscussionID=3755, i cant get my bSelectedOnly working. Am I doing it wrong? I've read the button options and its said if no rows were selected, the value is false which should output all the rows to be exported?

Here is my code,

[code]
var oTable;
oTable = $('#example').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": 'TC<"clear">lfrtip',
"oTableTools": {
"sRowSelect": "multi",
"sSwfPath": "/js/media/swf/copy_cvs_xls_pdf.swf",
"aButtons": [
"copy", "xls",
{
"sExtends": "pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Member List",
"mColumns": "visible",
"bSelectedOnly": true
}
]

}
} );
oTable.fnSetColumnVis( 0, false );
oTable.fnSetColumnVis( 6, false );
oTable.fnSetColumnVis( 8, false );
[/code]

Please point me at the right direction, Thank you very much!

Replies

  • ctct Posts: 9Questions: 0Answers: 0
    I have the same problem.

    :-S
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Can you link to an example showing the problem please?

    Thanks,
    Allan
  • aaronhaaronh Posts: 9Questions: 0Answers: 0
    What I believe he is talking about is the same problem that I just came here to post about.
    bSelectedOnly is behaving correctly for me in that it will only take the rows that are selected, however if no rows are selected, instead of automatically using them all as it says in the documentation, it simply doesn't select any rows at all. A fix for that would be greatly appreciated!
  • aaronhaaronh Posts: 9Questions: 0Answers: 0
    Has anyone discovered as to why this isn't working properly? I've tried about everything that I can think of, short of re-coding the function myself, and I can't figure out why it's not using all values when none are selected.
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    There was an error in the logic for the bSelectedOnly option - I've just updated TableTools with the required change - could you try the nightly please: http://datatables.net/download ?

    Thanks,
    Allan
  • aaronhaaronh Posts: 9Questions: 0Answers: 0
    Tested the updated files, and it works great now. Thanks!
  • GustGust Posts: 17Questions: 0Answers: 0
    Is the nightly build near stable release?

    Since the update made to TableTools only work for 1.8.2 release...


    Thanks

    Gust
This discussion has been closed.