Print the edit window
Print the edit window
xDac
Posts: 3Questions: 1Answers: 0
I have print, export functions working within Data Tables.
I would like to add print to the editor edit window (ie add print to formButtons) . I have the print button showing but no printing or exports happening within the Edit window
Any examples, pointers grateful
ie
buttons: [
{ extend: "create", editor: editor},
{ extend: "edit",
editor: editor,
formButtons: [
{
label: 'Cancel',
fn: function () { this.close(); }
},
'Save row',
'print'
]
},
{
extend: "selected",
text: 'Duplicate',
action: function ( e, dt, node, config ) {
// Start in edit mode, and then change to create
editor
.edit( table.rows( {selected: true} ).indexes(), {
title: 'Duplicate record',
buttons: 'Create from existing'
} )
.mode( 'create' );
}
},
etc
This discussion has been closed.
Answers
Hi @xDac ,
Do you want that print button to print just the details of the row being edited, or all rows as it does in the main table?
Cheers,
Colin
Hi,
The buttons available in the Editor form and the buttons available for the Buttons library are distinct (despite the name). I'm afraid it is not possible to use those form the Buttons library in the Editor buttons.
Allan
Hi
I want to have a print button next to the Update button so I can print the Edit Entry window in screen shot in a paper saving format.
In my dataTable I have 5 columns and in my dataTable.editor window I have 50 fields!
Are there other options such as export to PDF or do I have to collect the entries in code and display in a custom html pop up?
Would a solution be to have the extra 45 fields as hidden fields in the dataTable and un hide them somehow when a row is selected to print?
Hi @xDac ,
This might be a better way to go - see here. There's two print buttons - one prints everything, the other only prints two columns of the selected row. Would that work?
Cheers,
Colin