AutoColumnSize for a single column

Tags: #<Tag:0x00007f51bfd35c30> #<Tag:0x00007f51bfd35730>

In my large grid I only want a single column to be autosized, as autosizing them all is too expensive from a performance perspective (and is unnecessary). Is there a way to do that? (I’m asking because I don’t see such a configuration option on the plugin page.)

Thanks.

Hi @dhaber

Unfortunately it’s not possible. This plugin works only globally as it needs to get the information about all of the columns and container width to work properly.

OK, understood. I was kind of hoping you could point me at whatever happens when I double click to the right of the column header, which triggers just that column to autosize. :man_shrugging:

@dhaber,
there does appear to be a method you can use to get the column width.https://handsontable.com/docs/javascript-data-grid/api/auto-column-size/#calculatecolumnswidth. It looks like it using a ghostTable or a DocumentFragment to calculate the width. I hope that helps.