Scroller question

Scroller question

shankarastashankarasta Posts: 14Questions: 6Answers: 0

Hi,

I have been using datatables for a while and it works wonderfully.
I use datatables to display results that I retrieve from a "content management system".
Some of my CMS query return 1000s of records, but I really don't know how many until the last record has been retrieved.
CMS system does not tell me how many records will be retrieved.
This is why I haven't been able to use your server-side process logic as it needs to know the total records

Answers

  • shankarastashankarasta Posts: 14Questions: 6Answers: 0

    So, I would like to use the scroller and implement my own paging logic.

    I would like to call my server to return more rows when the use scrolls to the last row.
    How can I tell whether the user has reached the last row?

    My DataTable code is below:

              //format with datatable widget
                var searchResultTable = $("#resultTable").DataTable(
                        {
                            "bPaginate": true,
                            "bLengthChange": true,
                            "bFilter": true,
                            "bSort": true,
                            "bInfo": false,
                            scrollY:        200,
                        deferRender:    true,
                         scroller:       true,
                            "bAutoWidth": true,
                            "sPaginationType": "full_numbers",
                            "sDom": '<"H"Tfr>t<"F"ip>',
                            "bDestroy": true,
                            "fnDrawCallback": function() {
                                //To open the link in a new window
                                $('a').click(function() {
                                    $(this).attr('target', '_blank');
                                });
                            }
                        });
    
This discussion has been closed.