I want to separate the position of the pageLength and the other buttons

I want to separate the position of the pageLength and the other buttons

jdanignjdanign Posts: 4Questions: 2Answers: 0
edited February 2022 in Buttons

I have this:
'dom': "<'row mb-2'<'col-12 col-md-6'B><'col-12 col-md-6'f>>" + "<'row'<'col-12'rt>>" +
``` "<'row'<'col-12 col-md-6'i><'col-12 col-md-6'p>>",

And this:
'buttons': [ {'extend': 'pageLength', 'className': 'bg-gradient-lightblue border-0 shadow-sm'},
{'extend': 'print', 'className': 'bg-gradient-gray border-0 shadow-sm', 'text': '<i class="fas fa-print"></i> Imprimir'}, {'extend': 'excel', 'className': 'bg-gradient-gray border-0 shadow-sm', 'text': '<i class="fas fa-file-excel"></i> Excel'},
``` {'extend': 'pdf', 'className': 'bg-gradient-gray border-0 shadow-sm', 'text': '<i class="fas fa-file-pdf"></i> PDF'}

But when I try to change the "l" position, it always appears together "B"

Answers

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    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

  • jdanignjdanign Posts: 4Questions: 2Answers: 0

    Hi,
    I just need to know how to put the pageLenght button in a place and the excel, pdf buttons in another place.
    I have looked for an example, but I didn't find anything like this.
    Thank you

  • kthorngrenkthorngren Posts: 20,425Questions: 26Answers: 4,794

    Since you aren't showing us how you are trying to include both the lengthMenu and Buttons, I'll guess that you aren't setting the Bootstrap columns correctly. To display the lengthMenu, Buttons and search input separately on the same line you will need to define 3 columns, something like this:

    <'col-sm-12 col-md-3'l><'col-sm-12 col-md-3'B><'col-sm-12 col-md-3'f>
    

    See this example:
    http://live.datatables.net/wetuhupo/1/edit

    If this doesn't help then please update the test case to show the problem so we can offer suggestions.

    Kevin

Sign In or Register to comment.