Hi,
I have a table with multiple columns.
Is it possible to set autoColumnsWidth to true just for a single column?
Or is it possible to define Column Widths for dimension columns and make it auto for the cell columns?
Thanks in advance,
Ali
Hi,
I have a table with multiple columns.
Is it possible to set autoColumnsWidth to true just for a single column?
Or is it possible to define Column Widths for dimension columns and make it auto for the cell columns?
Thanks in advance,
Ali
Hi Ali,
The auto column width property is a table level setting. You can’t apply the setting only for individual columns per-se. You can also set column width in pixels by index. The combination of manual column width with auto width is a bit tricky as the auto columns width is determined by the length of the column header string and this defined the minimum width with the manual value taking priority only if it is more than the auto-width. So if you set the column widths and hit “save to options” and then went into the options json code to the columns widths section and edited …
"colWidths": [
160,
100,
100,
100,
100
],
to
"colWidths": [
160,
100,
0,
0,
100
],
Then this might do what you want and the 3rd and 4th columns would get the auto-width. But it would only work if the manual widths were more than the manual values.
As the setting applies to a table if you merge widgets then the setting value from the master widget will apply to the whole merged table.
Hi Scott,
Thank you it really works. Such a great trick.
But I was not aware that the auto-width is determined by the length of the column header.
I think what I need is not possible to build. Because I need to determine the width according to the cell values’ length.