Home > Mobile >  How to change datatable show entry position
How to change datatable show entry position

Time:03-12

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" ]]
            });

CodePudding user response:

    $('#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

  • Related