Problem with column width on reloading with new data

Problem with column width on reloading with new data

galcottgalcott Posts: 53Questions: 15Answers: 1

I'm having a problem which seems to be quite common, where column widths are not adjusting correctly after reloading a table with new data. I am calling the columns.adjust().draw() method but it doesn't seem to work. In other apps this has worked correctly for me so I'm not sure what the problem is here. A test page is at comfortfitdata.com/test.html. The data changes when you select another category in the dropdown. The second column, with the red X icon, is supposed to be a fixed width of 40px but it is expanding depending on the data in the first column. See the functions ChangeCategory() and AdjustColumns() for the relevant code.

Glenn

Answers

  • galcottgalcott Posts: 53Questions: 15Answers: 1
    edited September 2019

    I figured this out. It was because I had CSS to suppress the table header display:
    thead {display: none}

    When I removed this the columns adjusted properly.

This discussion has been closed.