I am using jquery Datatables.
In a case where data is null/empty(aaData), I want to redirect to error page instead of showing standard error message in the table “No data available in table”. How can I achieve this. Does datatable provide any standard way of handling this?
I am using jquery Datatables. In a case where data is null/empty(aaData), I want
Share
There is not as far as I know a standard feature of datatables that will do this for you.
As the datatable is flexible as to the source of its data, where you place the logic for this may differ depending on your settings, we pretty much always fetch data through ajax calls, so for us the best location to put this is in the fnServerData function.
I’ll update with more concrete code if needed.