2

In AngularJS ag-grid, how can I get new columns width after resizing ?

Here is part of grid configuration :

            $scope.gridOptions = {
                enableColResize: true                   
            };

Thx

2 Answers 2

2
gridOptions.columnApi.getColumnState(); 

returns informations about columns : https://www.ag-grid.com/javascript-grid-column-api/index.php

Sign up to request clarification or add additional context in comments.

1 Comment

columnApi is now deprecated and you should access gridApi instead ref: ag-grid.com/javascript-data-grid//grid-api/…
0
$scope.resizeGrid-function(grid) { 
  setTimeout(function() { 
  grid.$gridServices?.DomUtilityService.RebuildGrid(grid.$gridScope, grid.ngGrid);
  }, 100);
}

To fix the shrinkage issue of aggrid in angular js.

Use above function to fix the issue and just pass your grid in this function.

This solution only works for angular js not for angular.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.