Omit empty row
Omit empty row
A number of my tables contain no data rows. When initialising datatables, it inserts a new row that includes the value from oLanguage.sEmptyTable
What I would like is for datatables to completely omit adding this row, and simply leave the header with no rows in the body.
From looking at the docs, I can't see a way to do this.
I've worked around it by manually removing any empty rows after datatables is initialised:
[code]$('tbody>tr>td.dataTables_empty').parent().remove();[/code]
Also, I noticed a slight discrepancy in the documentation, the sRowEmpty custom class documentation states:
"Applied to the TR element that DataTables will create to show 'No matching records' information"
when in fact sRowEmpty is applied to a single TD element within the TR (at least that is what I'm seeing).
Thanks
What I would like is for datatables to completely omit adding this row, and simply leave the header with no rows in the body.
From looking at the docs, I can't see a way to do this.
I've worked around it by manually removing any empty rows after datatables is initialised:
[code]$('tbody>tr>td.dataTables_empty').parent().remove();[/code]
Also, I noticed a slight discrepancy in the documentation, the sRowEmpty custom class documentation states:
"Applied to the TR element that DataTables will create to show 'No matching records' information"
when in fact sRowEmpty is applied to a single TD element within the TR (at least that is what I'm seeing).
Thanks
This discussion has been closed.