Been struggling to get paging to work

Been struggling to get paging to work

carnagelancarnagelan Posts: 1Questions: 1Answers: 0
edited August 30 in Free community support

Hello All,
I hope someone can please help me. I have a database with a list of about 10000 items, when i start up my c sharp asp.net core(MVC) app it crashers as it cant bring 10000 into a single table.
My table ID is example1 and this is the example data table java code i am using. *: Please if someone can guide me in getting this correct

    <script>
    $(function () {
    ("#example1").DataTable({
    "responsive": true, "paging": true, "pageLength": 10, "lengthChange": false, "autoWidth": false,
    "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
    }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
    $('#example2').DataTable({
    "paging": true,
    "lengthChange": false,
    "searching": false,
    "ordering": true,
    "info": true,
    "autoWidth": false,
    "responsive": true,
    });
    });
    </script>

Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

Answers

  • kthorngrenkthorngren Posts: 21,443Questions: 26Answers: 4,974

    If you want server side paging then you will need to enable server side processing. You server script will need to support the SSP protocol.

    You can create your own SSP scripts or use one provided by Datatables. See this blog for how to use Datatables supplied scripts. The blog refers to a basic SSP script you can look at if you want to create your own.

    Kevin

Sign In or Register to comment.