Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to change datatable show entry position

I want to change datatable show entry position in my project by default it is on top left but i want to bottom right.

this is my datatable position code:

$('#ebayebuygumm').DataTable({
                 "sDom": 'Lfrtlip',
                "columnDefs": [
        { 
            "targets": [0,-1], //first column / numbering column
            "orderable": false, //set not orderable
        },
        ],
                 "lengthMenu": [[10, 50, 100, 250], [10, 50, 100, 250]],
                 "order": [[ 2, "asc" ]]
            });

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

    $('#ebayebuygumm').DataTable({
                     "sDom": '<"top"f>rt<"bottom"pli>',
                    "columnDefs": [
            { 
                "targets": [0,-1], //first column / numbering column
                "orderable": false, //set not orderable
            },
            ],
                     "lengthMenu": [[10, 50, 100, 250], [10, 50, 100, 250]],
                     "order": [[ 3, "asc" ]]
                });

and also this css
#ebayebuygumm_paginate{
    float: right;
}
#ebayebuygumm_length{
    float: right;
    margin-right: 12px;
}

"sDom": ‘<"top"f>rt<"bottom"pli>’,

by this you can change position of dom

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading