How add new button?
How add new button?
maskondo
Posts: 4Questions: 0Answers: 0
This simple, In the html code:
1º my new button called "ADD"
[code]$("#" + menu).dataTable({
"iDisplayLength": 25,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": 'l<"clear"><"H"Tfr>t<"F"ip>',
"oTableTools": {
"aButtons": ["xls", "pdf", "add"]
},[/code]
2º Add this code new button "add" or other:
[code]
TableTools.BUTTONS = {
"add": $.extend( {}, TableTools.buttonBase, {
"sButtonClass": "DTTT_button_csv",
"sButtonText": "ADD",
"sFieldBoundary": '"',
"sFieldSeperator": ",",
"fnClick": function( nButton, oConfig, flash ) {
//TODO }
} ),
"csv": $.extend( {}, TableTools.buttonBase, {
[/code]
If anyone knows how to best implement it, to me it works perfect ..
1º my new button called "ADD"
[code]$("#" + menu).dataTable({
"iDisplayLength": 25,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": 'l<"clear"><"H"Tfr>t<"F"ip>',
"oTableTools": {
"aButtons": ["xls", "pdf", "add"]
},[/code]
2º Add this code new button "add" or other:
[code]
TableTools.BUTTONS = {
"add": $.extend( {}, TableTools.buttonBase, {
"sButtonClass": "DTTT_button_csv",
"sButtonText": "ADD",
"sFieldBoundary": '"',
"sFieldSeperator": ",",
"fnClick": function( nButton, oConfig, flash ) {
//TODO }
} ),
"csv": $.extend( {}, TableTools.buttonBase, {
[/code]
If anyone knows how to best implement it, to me it works perfect ..
This discussion has been closed.
Replies
TableTools.BUTTONS.add = { .... }
[/code]
To add a new button called `add` .
There are examples of this here: http://datatables.net/extras/tabletools/plug-ins
Allan
Thank you.