Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sizeColumnsToFit issue #1224

Closed
rajgopalk opened this issue Oct 27, 2016 · 1 comment
Closed

sizeColumnsToFit issue #1224

rajgopalk opened this issue Oct 27, 2016 · 1 comment

Comments

@rajgopalk
Copy link

Iam applying sizeColumnsToFit to grid.it works fine but it will show a horizontal scrollbar.scrollbar covers upto the width of vertical scrollbar.
my code:
$scope.gridOptions = {
columnDefs: columnDefs,
debug: true,
rowData: null,
angularCompileRows: true,
rowGroupPanelShow: 'always',
enableFilter: true,
enableSorting: true,
rowSelection: 'multiple',
enableColResize: true,
rowModelType: 'pagination',
paginationPageSize: 100,
onGridReady: function (event) {
event.api.sizeColumnsToFit();
}

Screenshot:
1

@ceolter
Copy link
Contributor

ceolter commented Oct 31, 2016

the grid is autosizing before the scrolls are visible.

change to this:

onGridReady: function (event) {
   setTimeout( function() {
     event.api.sizeColumnsToFit();
   }, 0);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants