Server side pagination using limit 10 or 25

Server side pagination using limit 10 or 25

patelhiten99patelhiten99 Posts: 1Questions: 0Answers: 0

How to add Server Side Pagination in this function, using per page limit 10 or 25

$('#example1').DataTable({
            "columnDefs": [
                { "visible": false, "targets": 1 }
            ],
            "order": [[ 0, 'asc' ]],
            "displayLength": 10,
            "drawCallback": function ( settings ) {
                var api = this.api();
                var rows = api.rows( {page:'current'} ).nodes();
                var last=null;

                api.column(1, {page:'current'} ).data().each( function ( group, i ) {
                    if ( last !== group ) {
                        $(rows).eq( i ).before(
                            '<tr style="background-color:    #e5e7e9  ; color:black;font-weight:bold "><td colspan="6">'+group+'</td></tr>'
                        );
                        last = group;
                    }
                });
            }
        });

Replies

This discussion has been closed.