On 1st DataTable Render, Empty Message (“No Data”) Has Colspan = 0 (Subsequent Renders OK)
On 1st DataTable Render, Empty Message (“No Data”) Has Colspan = 0 (Subsequent Renders OK)
I am using: DataTables 1.10.11
I have a Search button on the form that destroys and re-initializes a DataTable to display the results of the latest search. This works fine.
_$('#resultsTable').DataTable().destroy();
$('#resultsTable').DataTable( { ... } );
_
The 1st time I search after coming onto the page, if there are no results, the Empty message is **colspan=0 **and not displayed correctly.
But on all subsequent Searches, for the same no-data empty result, it correctly becomes colspan=N which is the number of columns (in my case 8).
Why is the initial colspan for an empty result incorrect?
This discussion has been closed.
Replies
It would be helpful if you could post a link to your page or a test case replicating the issue. Otherwise, without seeing what you are doing its difficult to say what the problem is.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
i think that you are missing some with the reload method, like @kthorngren says it will be usefull a test case for fast debug.