I am using jquery dataTables plugin to display data on my site. If I retrieve the data using the DataTable() built in ajax call, the table displays a 'Loading...' message while the data is being retrieved.
I have a need to retrieve the data outside the DataTable() call to avoid double processing and am using a ViewModel to pass data into the DataTable() function and several other fields on the page with a single call to the database server.
Is there a way to use a basic DataTable() , without any data, and force a 'Loading...' message.
I basically want to make a $('#table').DataTable(); call to display a skeleton table, no rows or columns, just the basic layout with the word 'Loading...' displayed, then, after I make an ajax call to retrieve the data, destroy the table before re-calling DataTable() and passing in the retrieved json data