Print Button
Print Button

Hi guys,
do you know how i can add an print button in here? (picture)
i used that code for the rest of the buttons.
//Button Farbe
buttons: {
className: "btn-light",
buttons: [
//Neu and Cancel Button
{ extend: 'create', className: 'btn-light', text: 'Neu', editor: editor,
formButtons: [
'Neu',
{ text: 'Cancel', action: function () { this.close(); } }
]
},
//Edit Button + Funktion für vor, zurück und speichern
{ extend: 'selected',className: 'btn-light', text: 'Bearbeiten',editor: editor,
action: function () {
var indexes = table.rows( {selected: true} ).indexes();
editor.edit( indexes, {
title: 'Bearbeiten',
buttons: indexes.length === 1 ?
backNext :
'Save'
} );
},
},
//Delete and Cancel Button
{ extend: 'remove', className: 'btn-light', text: 'Löschen', editor: editor,
formMessage: function ( e, dt ) {
var rows = dt.rows( e.modifier() ).data().pluck('bez');
return 'Sicher das du folgende Einträge löschen möchtest? '
},
formButtons: [
{ text: 'Abbrechen', action: function () { this.close(); } },
'Löschen'
]},
//Reihenanzeige Button
{ extend: 'pageLength', className: 'btn-light'},
//Vorstellungsformular
{ extend: 'selected',className: 'btn-light', text: 'Vorstellungsformular', editor: editor2,
action: function () {
var indexes = table.rows( {selected: true} ).indexes();
editor2.edit( indexes, {
title: 'Vorstellungsformular',
buttons: indexes.length === 1 ?
backNext :
'Save'
} )
},
}
This discussion has been closed.
Answers
this is my edit window
Hi @churchil ,
Do you mean on an Editor form?
Cheers,
Colin
yes
Hi @churchil ,
You would add a custom form button with
formOptions
like this example here. I couldn't find an example which prints the form's contents - you could possibly use the Buttons extension as a starting point perhaps.Cheers,
Colin
Yes i want to have it like the example.
but why i cant Print with this button?
Can you help me one more time
i dont now how it looks like with my button
can you show me the code that i can see it with my code? The Print button inside this button?
ok i know why the button dont work
but how can i include this button in my script (picture above)
it already work