Empty datatable default row does not span all columns

Empty datatable default row does not span all columns

gaurav_shettygaurav_shetty Posts: 3Questions: 0Answers: 0
edited March 2012 in Bug reports
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.

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Can you please link me to an example of this? It appears to work just fine here: http://live.datatables.net/ilenus/edit

    Allan
  • gaurav_shettygaurav_shetty Posts: 3Questions: 0Answers: 0
    Sorry for the delay. Really did not expect such a prompt response!!

    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.
  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    edited March 2012
    > 2) I am using colspan for some of the headers.

    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
  • gaurav_shettygaurav_shetty Posts: 3Questions: 0Answers: 0
    Yes. Every column has a unique header cell. All other features work correctly. Will try out debug.datatables and let you know the results.
This discussion has been closed.