SeverSide Paging - Stop initial ajax call on table initialization

SeverSide Paging - Stop initial ajax call on table initialization

MirMir Posts: 27Questions: 7Answers: 1

I have a dataTable initialized with server side paging and it is working fine. This table triggers ajax, pulls data and renders onto the table during initialization. However I need empty table initially and load table data on click of a button using load() or reload() like:

myTable.api().ajax.reload(); 

Here is my table initialization:

function initTestTable(){
    myTable =  $('#testTable').dataTable({
        "processing": true,
        "serverSide": true,
        "ajax": {
            "url": "testTableData.html",
            "type": "GET",
        },
        "columns": [
            { "data": "code" },
            { "data": "description" }
        ]
   });
}

Is there a way I restrict the loading of table during initialization?

This discussion has been closed.