Create a New Button Collection

Create a New Button Collection

namhungnamhung Posts: 2Questions: 2Answers: 0

Hi,

I am using a button collection which is extended from built-in html5 buttons.
var table = $('#myTable').DataTable({
........
buttons: [
{
extend: 'csvHtml5',
title: 'My Leaves',
exportOptions: {
columns: [5, 6, 7, 8, 9, 10, 23, 24]
}
},
{
extend: 'excelHtml5',
title: 'My Leaves',
exportOptions: {
columns: [5, 6, 7, 8, 9, 10, 23, 24]
}
},
{
extend: 'pdfHtml5',
title: 'My Leaves',
exportOptions: {
columns: [5, 6, 7, 8, 9, 10, 23, 24]
}
},
{
extend: 'copyHtml5',
text: 'Lưu Bộ Nhớ Tạm',
exportOptions: {
columns: [5, 6, 7, 8, 9, 10, 23, 24]
}
},
{
extend: 'print',
text: 'In Tất Cả',
title: 'My Leaves',
exportOptions: {
columns: [5, 6, 7, 8, 9, 10, 23, 24]
}
}
]
.....

Now, I want to add my own collection- a new button named "Actions" and when I click on it, the "ADD, DELETE,EDIT" buttons will be shown down.

Please help me to do that. Many thanks.

This discussion has been closed.