Create separate TableTools "aButton" group with Bootstrap

Create separate TableTools "aButton" group with Bootstrap

carlgcarlg Posts: 29Questions: 0Answers: 0
edited January 2013 in TableTools
Hi,

I'm using Bootstrap styling for my TableTools buttons w/ Editor so I have a New, Edit, and Delete group of buttons that are all connected in Bootstrap button container fashion. I have a 4th button I would like to be right next to the other 3, except not connected, so it stands out as a different type of option. Right now it is just connected to the other buttons so I have a group of 4.

I see I can't just implement 'aButtons' twice to try to separate it; is there another way this could be achieved?

[code]
"oTableTools": {
"sRowSelect": "single",
"sSelectedClass": "row_selected",
"fnRowSelected": function ( node ) {
gateway_id = oTable.fnGetData(node[0])[5];
},
"aButtons": [
{ "sExtends": "editor_create", "editor": editor },
{ "sExtends": "editor_edit", "editor": editor },
{ "sExtends": "editor_remove", "editor": editor },
{
"sExtends": "select_single",
"sButtonText": "Manage Silos",
"fnClick": function ( node ) {
if ($(node).hasClass('disabled')) {
return false;
} else {
window.location = '/#request.self#?fuseaction=gwt.details&gateway_id=' + gateway_id;
}
}
}
]
}
[/code]

Thanks,
Carl

Replies

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    Hi Carl,

    > I see I can't just implement 'aButtons' twice to try to separate it; is there another way this could be achieved?

    Correct - aButtons is a single instance option - however, you can create a new TableTools instance and then attach it to the document using the method shown here: http://datatables.net/release-datatables/extras/TableTools/alt_init.html .

    Regards,
    Allan
  • carlgcarlg Posts: 29Questions: 0Answers: 0
    That worked nicely, thanks Allan.
This discussion has been closed.