Can't get columns to line up properly after filtering
Can't get columns to line up properly after filtering
I'm using server-side processing, showing 10 records at a time. The columns are set to auto width, which looks great - very custom. But when I filter the results or go to another page, quite often the first (fixed) column overlaps or underlaps (horizontally) the 2nd column a bit. This also sometimes adds an extra horizontal scrollbar, just for the fixed column.
I have added a button that calls some Javascript:
var oTable = $('#tblMetadata').dataTable();
oTable.fnAdjustColumnSizing();
When I click that button, it fixes the column alignment perfectly.
Question is: how can I get fnAdjustColumnSizing() to run automatically after I pull in a fresh set of records, like after I go from page 1 to page 2?
Replies
Can you link to the page so we can try to debug it please?
Thanks,
Allan
Unfortunately, I'm behind a firewall, and the data is proprietary. I tried to attach a screenshot, but don't know how to do that in this forum system.
There isn't an image attachment option unfortunately - you'd need to use an external image pastebin. However, I don't think an image will be enough for us to offer any help with this issue - a test case showing the issue would really be needed.
There is this thread which has an outstanding FixedColumns issue, which might be related. You might want to follow that thread for when I get a change to work on that fix.
Allan
Yes, that thread describes the same problem I'm experiencing.