serverside scrollY not work in Datatable 1.10.8

serverside scrollY not work in Datatable 1.10.8

fabocfaboc Posts: 2Questions: 1Answers: 0
edited July 2021 in Scroller

Hi Allan,
I have a problem with scrollY serverside. It not works.
I'm using DataTable 1.10.8.
the serverside is work fine when i click the page number. But i dont wanna page number. i wanna scrollY.

Is there changing code in "jquery.Datatable.js" or the code below. So, the scrollY can work.

here is the code :

$('#tabelpengguna').DataTable({                    
                    "processing": true,
                    "serverSide": true,
                    scrollY:        persen_height,
                    deferRender:    true,
                    scroller:       true,
                      scroller: {
                        loadingIndicator: true
                      },
                    "ajax":{
                               "url": "cobatable_ajx.php",
                               "dataType": "json",
                               "data":{
                                        "cekautoexc": 1
                                      },
                               "type": "POST",
                             },
                    "columns": [
                          { "data": "0" },
                          { "data": "1" },
                          { "data": "2" },
                          { "data": "3" },
                          { "data": "4" },
                          { "data": "5" },
                          { "data": "6" },
                          { "data": "7" },
                          { "data": "8" },
                          { "data": "9" },
                          { "data": "10" },
                          { "data": "11" },
                          { "data": "12" },
                          { "data": "13" },
                          { "data": "14" },
                          { "data": "15" },
                          { "data": "16" },
                          { "data": "17" },
                          { "data": "18" },
                          { "data": "19" },
                      ] ,
                     "aaSorting":[],
                    "aoColumnDefs": [
                          { "bVisible": false, "aTargets": [ 0 ] }
                        ],
                    "bJQueryUI":true,
                    "bFilter": true,
                    "bPaginate":true
                    
                    
                });

Note : If i'm using DataTable 1.10.25, the scrollY in serverside works. i have try it. But i can't change version because the display not same with Datatable 1.10.8 (like the header,footer not same). i'm using JqueryUI with bootstrap 2.3.

Thank You,

Bambang

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

Answers

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    I would recommend upgrading here, as 1.10.8 is six years old now so isn't supported. When you say the header and footers are different, could you create an example to demonstrate that, please. The way to go would be to upgrade, and get those elements addressed.

    Colin

  • fabocfaboc Posts: 2Questions: 1Answers: 0
    edited July 2021

    Here is using datatable 1.10.25 with using css "jquery.dataTables.min.css" and "jquery.dataTables_themeroller.css" for datatable 1.10.25 :

    and here is using datatable 1.10.8 :

    Maybe you can help me to change the layout like datatable 1.10.8. what should i do to change the header.

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    As I said, we're happy to take a look if you can create a test case for us to look at. Information on how to create a test case is available here.

    Cheers,

    Colin

Sign In or Register to comment.