Custom "New" button
Custom "New" button
nskwortsow
Posts: 120Questions: 0Answers: 0
Hi Allan,
How would I go about creating a custom "New" button to trigger the editor (and not using Tabletools)
N
How would I go about creating a custom "New" button to trigger the editor (and not using Tabletools)
N
This discussion has been closed.
Replies
[code]
editor.create( title, buttons );
[/code]
The buttons are defined in the same way as used in the `buttons` method: http://editor.datatables.net/docs/current/Editor.html#buttons .
So you could do something like:
[code]
$('#mynewButton').click( function () {
editor.create( 'New', {
"label": 'Create',
"fn": function (e) {
this.submit();
}
}
} );
[/code]
All of the TableTools buttons that Editor adds are just handy wrappers around the public API - no hidden parameters are accessed :-).
Allan