Change List length to Button length in custom first row
Change List length to Button length in custom first row
John Dow
Posts: 16Questions: 6Answers: 0
I have a custom first row template (three parts), thanks Kevin. Using this I get that the button is above the row. How to put a new button in
dom: "<'row'<'col-sm-12 col-md-3'**HERE**><'col-sm-12 col-md-6'f><'col-sm-12 col-md-3'B>>"
It is my code:
var table = new DataTable('#example', {
dom: "<'row'<'col-sm-12 col-md-3'l><'col-sm-12 col-md-6'f><'col-sm-12 col-md-3'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
buttons: [
'copy', 'excel'
]
} );
new $.fn.dataTable.Buttons( table, {
buttons: [
'pageLength'
]
} );
table.buttons( 1, null).container().prependTo(
table.table().container()
);
This question has an accepted answers - jump to answer
Answers
Take a look at the
dom
Markup docs to see how to add an ID to one of thediv
elements. Add the ID and change line 19 to use that ID as the selector. For example:https://live.datatables.net/hawubena/4/edit
Kevin
Thank you Kevin, I learned a lot from you! It is work!