ServerSide - iDisplayStart allways set to 0

ServerSide - iDisplayStart allways set to 0

draufsichtdraufsicht Posts: 4Questions: 1Answers: 0

Hi,
ive allready use Datatables since version 1.8. Now I'm trying to use it in an existing project with bootstrap and all basic features work very well, but the pagination does not work. I've debug the code with z-ray and found out that on each pagination link the send iDisplaySart value is 0. I've read many forum entrys and found no solution. Here is a part of my code:

    var oTable;
    $(document).ready(function(){
        oTable = $('#tableCmsAdressen').DataTable({
        /* Column Width */
            "aoColumns": [
            { "bVisible": false,"bSearchable": false,"sClass":"ClickClass"},
            { "bVisible": false,"bSearchable": false,"sClass":"ClickClass"},    
            { "bVisible": false,"bSearchable": false,"sClass":"ClickClass"},
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass"},
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass"},
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass"},
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass"},
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass"},
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass"},  
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass"},  
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass"},
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass"},                      
            { "bVisible": true,"bSearchable": true,"sClass":"ClickClass" }],
                           
            /* Serverside Prozessing(Ajax) */
            "bProcessing": true,
        "bServerSide": true,
        "sAjaxSource": "index.php?res=dt_cms_adresse",
            
            /* Default Settings */ 
        "bStateSave": true,   //rember Page,Filter,Rows
        "bAutoWidth": false,
        "iDisplayLength": <?php echo $_SESSION['loggedin_user']['rowsBig']?>,
        "aLengthMenu": [[10, 15, 20, 25, 30, 35, 40, 45, 50, 100, 400], [10, 15, 20, 25, 30, 35, 40, 45, 50, 100, 400]],
        "aaSorting": [[ 8, "asc" ]],

        /* Pagination & Language Translation */
        "sPaginationType": "full_numbers",
            "oLanguage": {
                "sEmptyTable": "keine Daten vorhanden",
                "sInfo": "Datensatz _START_ bis _END_ von _TOTAL_",
                "sInfoEmpty": " 0 to 0 of 0 Datens&auml;tzen",
                "sInfoFiltered": "(gefiltert von _MAX_ Datens&auml;tzen)",
                "sInfoPostFix": "",
                "sInfoThousands": ",",
                "sLengthMenu": "_MENU_ Zeilen",
                "sProcessing": "Verarbeite Daten...",
                "sSearch": "Suchen",
                "sZeroRecords": "keine Daten gefunden",
                "oPaginate": {
                    "sFirst": "<<",
                    "sLast": ">>",
                    "sNext": ">",
                    "sPrevious": "<"
                }
            },
            "oAria": {
                "sSortAscending":  ": aufsteigend sortieren",
                "sSortDescending": ": absteigend sortieren"
            },
            scrollX: true
        });

        $('#tableCmsAdressen tbody').on( 'click', 'tr', function () {
            var aData = oTable.row( this ).data();
            window.location = "index.php?do=cms-adresse&adrid="+aData[0]+"&manid="+aData[2];  
        });
    
        $("td:empty").html("&nbsp;");       
    });  

This question has an accepted answers - jump to answer

Answers

  • draufsichtdraufsicht Posts: 4Questions: 1Answers: 0

    Sorry I forget to declare: now i'm using DataTables 1.10.16 and DataTables Bootstrap 3 integration

  • allanallan Posts: 63,550Questions: 1Answers: 10,476 Site admin

    Thanks for your question. As noted in the forum rules, please post a link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Allan

  • draufsichtdraufsicht Posts: 4Questions: 1Answers: 0

    I'm not able to send you a testlink to my envirement, but i've tryed out the datatables debugger. I hope you can open the debug session:

    http://debug.datatables.net/ohayaj

    Thank you!

  • allanallan Posts: 63,550Questions: 1Answers: 10,476 Site admin
    Answer ✓

    It says that DataTables 1.10.2 is being used. The debugger is actually wrong when it says that it is up to date - 1.10.16 is the current release. Can you update to that please?

    Allan

  • draufsichtdraufsicht Posts: 4Questions: 1Answers: 0

    the debugger are alright. I have overlooked that version 1.10.2 was loaded. My code-framework had the wrong version loaded.

    everything works now. Many Thanks !

This discussion has been closed.