How make an AJAX call to get the records on click of 'Next-Prev' buttons.

How make an AJAX call to get the records on click of 'Next-Prev' buttons.

trishatrisha Posts: 5Questions: 4Answers: 0

I tried looking at some of the forums here, but i couldn't get it clear. the table looks like:
var totalRecs = this.accountCollection.length;

    //create the UI grid containing the list of items

    this.resultsTable = tableEl.dataTable( {
        "bServerSide": true,
        "sEcho": 3,
        "iTotalRecords": totalRecs,
        "iTotalDisplayRecords": 15,
        "aaData": tableData,
        "aoColumns": tableColumns,
        "aaSorting": [[1,'asc']],
       });

I have a JSON that would return back more than 1000 records. with the above attrs, I'm only getting 1 to 15 of 15 records and does not show me the next pages. I know im missing something here...can someone plz guide me..? Thanks

Answers

  • niftyhawkniftyhawk Posts: 3Questions: 1Answers: 0
  • trishatrisha Posts: 5Questions: 4Answers: 0

    tried that as well..something like this...nothing works:

                "aaData": tableData,
                "aoColumns": tableColumns,
                "aaSorting": [[1,'asc']],
               // "bServerSide": true,
                 "processing": true,
                "serverSide": true,
                "sAjaxDataProp": "assets",
                "sScrollX": "100%",
                "sDom": '<"account-list-header" Cf>trip',
                "bDeferRender": true,
                "bJQueryUI": true,      // enable ThemeRoller
                "bProcessing": true,
                "pagingType": "simple_numbers",  
                "bLengthChange": false, 
                "bAutoWidth": false,
                "bScrollCollapse": true,
    
                "iTotalRecords": 34,
                "iTotalDisplayRecords":15,
                "iDisplayLength": 15,
    
This discussion has been closed.