Search code examples
javascripttabulator

Tabulator - is there a way to print just selected rows


I'm using the Tabulator javascript table:

http://tabulator.info/docs/4.3/print

Is there a way to just print selected rows:

 var table = new Tabulator("#example-table", {
    printAsHtml:true, //enable html table printing
    printVisibleRows:false, // print all rows in the table
});

What i am looking for is an option like "printSelectedRows: true) or some sort of work-around i can use to accomplish this.


Solution

  • There is no such option. One work around I can think of is a filter that results in only the rows you want being visible and not using printVisibleRows:false. Then only those rows would print. This of course depends on the row selection having some common element. For ad-hoc selection work around's I can think of are: 1) Moveable rows: http://tabulator.info/docs/4.3/move#rows Move the rows you want to the visible part of the table.

    2) Move between tables: Move rows to another table for printing. http://tabulator.info/docs/4.3/move#rows-table