gargi
gargi

Reputation: 113

fullnumber pagination style in datatables to disable first and last button when on first and last page of data respectively

I have having the problem to disable first and last button when on first and last page of data respectively. I am using datatables with full no pagination style. Its showing the first , next , prevoius , last buttons but when i m on 1st page , the first and the next page are not disabled same with next and last in the last page.

the code is:-

$('#data_table').dataTable( {
        "aaData": dataSet,
        "aaSorting": [[0,'asc'],[0,'desc'],[2,'asc'],[2,'desc'],[3,'asc'],[3,'desc'],[4,'asc'],[4,'desc'],[5,'asc'],[5,'desc'],[6,'asc'],[6,'desc'],[7,'asc'],[7,'desc']],
        "iDisplayLength": 4,                
        "bInfo": true,
        "bLengthChange": false,
        "bPaginate": true,
        "bAutoWidth": false,
        //"bJQueryUI": true,
        "sPaginationType":"full_numbers",               
        "sPageButton": "paginate_button",
        "sPageButtonActive": "paginate_active",
        "sPageButtonStaticDisabled": "paginate_button",
        "sScrollX": "120%",
        //"bAutoWidth": true,
})

Upvotes: 4

Views: 7798

Answers (1)

Nicola Peluchetti
Nicola Peluchetti

Reputation: 76880

Well you could hide them through CSS i think.

.dataTables_paginate .ui-state-disabled {
     display:none;
}

if you provide an example on jsfiddle.net whe can help you better

Upvotes: 4

Related Questions