0

I am using ag-gird table with plenty columns. For still displaying the whole content of each column I want to use autoSizeAllColumns() on the columnApi.

I can see the whole content of a column, however this setup makes my columns even wider than necessary. For example the column "Typ" only consists of 1 or 2. Still the width is far to high:

This is what it looks like

Alex
  • 81
  • 6

1 Answers1

0

autoSizeAllColumns has the following interface:

autoSizeAllColumns = (skipHeader?: boolean) => void;

I'd recommend calling autoSizeAllColumns(true) and see if that makes an improvement, as the grid will now size the column based only on the content, and will ignore the header.

If that does not help, then I'd recommend looking into using Column Flex.

Shuheb
  • 2,012
  • 1
  • 4
  • 6