Incorrect table header column widths when using rowGrouping with startRender

Incorrect table header column widths when using rowGrouping with startRender

karishma10karishma10 Posts: 1Questions: 1Answers: 0

Previously, I was using version 1.13.8 of the Datatable, and all the widths were working fine. However, as soon as I updated to any of the Datatable v2 versions, I started facing this issue.

Here is the test case:
https://live.datatables.net/lutoniza/8/edit

Is there any way to fix this issue? Or is there any specific updated version where this issue is not present?

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    It is a problem with the colspan unfortunately. I've not yet got a workaround for this.

    What appears to be happening is that in DataTables 2 the column widths are assigned using colgroup > col elements. This has proven to be much more reliable in every situation with the single exception of a colspan in the first row of a DataTable, such as in colgroup. The column widths from colgroup > col are being applied to the single cell of the grouping row, and it just doesn't work (unsurprisingly).

    To my mind that is a bug in the browser table renderer, but it happens in all browsers.

    What I think I'll need to do is, when using RowGroup, inject a hidden row into the table body as the first row and the widths can apply to that.

    Allan

Sign In or Register to comment.