Table Auto Resize Question

I have a table that gets a dataset dumped into it via a script (I am just setting the Data attribute of the table = to a dataset returned from a SQL query). Even though the auto-resize box is checked, the table columns do not resize. I don’t see any such thing in the help docs, but is there a function I need to call after updating the table data to get the columns to re-size? Or am I going about this wrong?

You can use table.setColumnWidth function to update the table columns, but it bounces back when the user resizes a column. Maybe adding the new column width to the columnAttributesData would solve the problem, but I haven’t had a chance to test that just yet.

For a long time there was a secret handshake you had to do to get the column widths to stick (open the table customizer and click OK), but I don’t remember off the top of my head whether that was fixed, and it probably won’t help you anyway since your column list is dynamic. Like adamaustin said, your best bet is to use the table.setColumnWidth() function.