How add new button?

How add new button?

maskondomaskondo Posts: 4Questions: 0Answers: 0
edited February 2013 in TableTools
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 ..

Replies

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    [code]
    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
  • maskondomaskondo Posts: 4Questions: 0Answers: 0
    Ok, I thought you can only add the buttons mentioned in Plug-ins
    Thank you.
This discussion has been closed.