Empty datatable default row does not span all columns
Empty datatable default row does not span all columns
gaurav_shetty
Posts: 3Questions: 0Answers: 0
When there is no data in the table Datatables adds a row will class dataTables_empty that has a colspan value = 0. This works fine in other browsers but not in Webkit based browsers where its size is reduced to 1 column width. I think we should change this to colspan="100%" which seems to work in all browsers.
This discussion has been closed.
Replies
Allan
I don't have a publicly accessible site where i can show this. Also in the example link i noticed that the colspan = "5" not 0. When I change it to 0 in web inspector the error is recreated. If needed I can send you a screenshot of it happening in my own tables.
Some particulars abt the table that i tried it on:
1) The data is loaded from an ajax source
2) I am using colspan for some of the headers.
I do not know if datatables is unable to count the number of columns because of this and tries to use the value 0 or it is supposed to be that way.
Does every column have a unique header cell? There much be at least one cell for every column in a DataTable (so DataTables knows how many columns there are, and so filtering, sorting can be applied to each column).
> Also in the example link i noticed that the colspan = "5" not 0. When I change it to 0 in web inspector the error is recreated.
Indeed - however it shouldn't be putting 0 in, so the question is, why is it putting that in.
Can you using the debugger on your table please since the page isn't currently accessible ( http://debug.datatables.net ) - ideally when the table is in its error state.
Allan