how use oSelectorOpts in TableTools

how use oSelectorOpts in TableTools

fmh14fmh14 Posts: 3Questions: 0Answers: 0
edited February 2014 in TableTools
Hello,
how use oSelectorOpts to select rows that has css class = "xxxxx" to export it with csv or excel.
thx.

Replies

  • allanallan Posts: 61,433Questions: 1Answers: 10,049 Site admin
    You cannot - that's not how oSelectoOpts work. See the DataTables `$` documentation for the selector options available: http://datatables.net/docs/DataTables/1.9.4/#$ . Basically there is no way to select based only on class for a TableTools export at the moment.

    Allan
  • fmh14fmh14 Posts: 3Questions: 0Answers: 0
    Ok, but can i export only some rows with filter ?
  • fmh14fmh14 Posts: 3Questions: 0Answers: 0
    ok, i
    1- add option to TableTools.buttonBase ("sCssClass": undefined)
    2- i check in "_fnGetDataTablesData": function var cls = oConfig.sCssClass === undefined ? "" : oConfig.sCssClass;
    3 - change : .$('tr' + cls, oConfig.oSelectorOpts)
    4- call : "sCssClass": ".status_0" in "aButtons"
    5- it works fine.
  • allanallan Posts: 61,433Questions: 1Answers: 10,049 Site admin
    Good stuff. Hurrah for open source :-)

    Allan
This discussion has been closed.