how to control multi button group in doms?
how to control multi button group in doms?

https://datatables.net/examples/basic_init/dom.html is useful to me, but i have one question
'B' is button group in dom. but another button group is...... ummm...
because i add one more button group using this code
new $.fn.dataTable.Buttons(theTable, {
buttons: [
{
text: 'Button 2',
action: function (e, dt, node, conf) {
alert('Button 2 clicked on');
}
},
{
text: 'Button 3',
action: function (e, dt, node, conf) {
alert('Button 3 clicked on');
}
}
]
});
theTable.buttons(1, null).container().appendTo(
theTable.table().container()
);
and i change dom (dom: "Blfrtip") -> (dom: "BlfrtipB")
but same button group expose twice.....
is there any solution?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Hi @jadehan ,
'B' only needs to go there once, so by default they're all grouped together. If you want to place them separately, you can do something like this.
Cheers,
Colin
hi @colin, thank you:)
but i have one more question
i want 2 button groups change location like
(button group1) (search input) (button group2)
I want 2 button groups and button group location change...
I try
buttons(0, null)
orbuttons(1, null)
but button groups located in a strange place...Hi @jadehan ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
@colin Thank you for your kind advice!
I create a test case this link
in my test case, second button group is under the datatables, but I want it show next to
show 10 entries
like this.thank you Colin!
Hi @jadehan ,
This looks like it's doing what you want: http://live.datatables.net/tepecani/4/edit
Cheers,
Colin