Column headers in dialog not adjusting correctly.
Column headers in dialog not adjusting correctly.
Hello,
I know this issue has plagued datatables for a long time, but I need some help. I have a bunch of datatables in jQuery dialogs, and the headings almost never match the contents of the table. The headings are not resizing as the dialog is resized either. When I click on a column to sort it, the columns resize correctly. As a quick fix, I would like to programatically trigger the code that resizes the columns when a user clicks on a column heading to sort it. Can someone tell me how I would trigger resize or sort code from my application?
This behavior has been noticed with DataTables version 1.10.1 and 1.10.2.
Answers
Actually this problem is happening with one table in our application that is created slightly differently than the other tables in our application. Here is the HTML that is used for the table.
Here is the table java script to create the table.
So the root of the problem seems to be the "scrollY" setting. If I remove that, the columns line up correctly both when the table is initially shown and when the dialog is resized. I would like to keep the scrollY setting, so if someone could still point me to the datatable column sort/resize code that would be great.