Reputation: 1043
I want to make auto size content for one spesific column at ag-grid. But I think this autoSizeColumns proeprty for all grid columns. What can I do? Is there anything else?
Upvotes: 1
Views: 223
Reputation: 3537
autoSizeColumns(colKeys) accepts an array of column IDs to auto size based on their content.
gridOptions.columnApi.autoSizeColumns(["SOME_COLUMN_ID"]);
Also setting the minWidth
&& maxWidth
in the column definition will lock the column size regardless of dragging the header or using one of the API methods.
Upvotes: 2