I was previously using aggrid v27 and to auto size the columns I used params.api.autoSizeAllColumns(); in onFirstDataRendered() function. After upgrading to v32, this is not working. In the migration guide it is mentioned that “Column API is now removed. API methods previously available via Column API are now available in Grid API instead”. I tried locating the function and using it from gridApi but it doesn’t seem to be working.
Expected: To autosize the columns to fit content width on load of aggrid in v32.
Poojana is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.