Allow hiding scrollbars if they are not necessary
I can't hide horizontal scrollbar, even if my table is narrow exapmle I can fully hide it by set enableHorizontalScrollbar = 0, but I need this scroll bar when I dynamically add columns
I'm having the same issue (with the latest unstable).
I wanted to try without the vertical scrollbar, but for some reason "enableVerticalScrollbar: false" on the gridOptions is being ignored (for me anyway).
If i set overflow-x: auto and overflow-y:hidden on the ui-grid-viewport div, the horizontal scrollbar works as expected: disappears if the colums can fit in the viewport and scrolling correctly if they cannot. It also fixes this weird scroll issue when you scroll all the way to the right:

I'm no expert on dom's, so I'm not sure how to work the viewport to include the vertical scrollbar correctly.
I face the same issue, any ideas how to fix it ?
Same here :( any solution?
@herdanskecommodities Your issue should no longer occur.
WHEN_NEEDED is no longer a valid option for the enable scrollbar properties. You can still toggle whether they're on or off, though. See this plunker for an example: http://plnkr.co/edit/h7uJHM2tZ0bSqkWInjOU?p=preview
Hi @c0bra , and thanks for the update + poke.
It would be neat to be able to have WHEN_NEEDED as an option, but I am assuming it would be difficult to re-implement in the current version?
It's not a must-have for the system I am working on right now, I am just curious why the option was removed, and whether there is any plans for it to make a return. =)
@swalters may be able to comment on that; I wasn't involved in the removal but my bet is that it's difficult to re-implement with the current native scrolling, yes.
I think this can be solved by removing the width of the vertical scrollbar from the ui-grid-canvas width...If i have a grid which fits perfectly
Original:

See when i remove 30px from it (width of vertical scrollbar) the horizontal bar disapears:

Could this be implemented @c0bra ? I have the problem that @herdanskecommodities has (yous aid it was solved but I seem to have the issue?)
Ah, I think it's solved in 3.0.0-rc.20!
I am using 3.0.0-rc.20 but. I still see the scrollbar issue.
I do not really know should it be here or should I create a new issue, this is about column adjustment
rc.20, IE-9
@pragatir Are you able to reproduce it in a plunker?
@PhilBroadbent it may be possible to implement it that way, yes.
@c0bra : As like @pragatir , me too using 3.0.0-rc.20 and facing the same issue. Here the apis are completely changed, for horizontal scroll bar, the values are different when compared to old version. The possible values are (from api guide) enableHorizontalScrollbar : uiGridConstants.scrollbars.ALWAYS by default. This settings controls the horizontal scrollbar for the grid. Supported values: uiGridConstants.scrollbars.ALWAYS, uiGridConstants.scrollbars.NEVER (not like ur pluker, $scope.gridOptions.enableHorizontalScrollbar = 2;)
so no possiblity to show whenever its needed..
do u have any idea to fix this issue?
@svmashok Adding a "WHEN_NEEDED" option should be possible, but we'll push it to v3.1 so it's not blocking a 3.0 release.
@MilovanovMaxim Can you get the scroll issue to happen in IE9 in this plunker? http://plnkr.co/edit/h7uJHM2tZ0bSqkWInjOU?p=preview
I am using v3.0.4 but I still got the same issue as @herdanskecommodities

I have no idea what to do to fix his problem just by CSS like what @PhilBroadbent mentioned.. because i have 3 dynamic grid inside my page and NOT every grid will have so many columns which needs a horizontal scrollbar.
Will it be fixed soon?
**** Updated ****

The same issue happened in vertical scrollbar .. when both horizontal scrollbar and vertical scrollbar exist, and i drag the vertical scrollbar to the bottom of the grid, and it shows this layout issue..
But anyway, thanks a lot and really appreciate what you guys did on ui-grid.
I'm also looking forward to WHEN_NEEDED. If that gets delayed, would at least be nice to not use inline styling on ui-grid-viewport (style="overflow: scroll;"). That is forcing me to hold my nose and use the !important flag in my css... .ui-grid-viewport { overflow: auto !important; }
if i am use .ui-grid-viewport { overflow: auto !important; }
then i can see only 15 record where i am set limit 50 how get i get all record
Yes. I was doing same... until i found this issue with pinned columns :( https://github.com/angular-ui/ui-grid/issues/4964
Would there be a way to attach the scroll bars to the outside of the ui-grid box instead of within the container to eliminate the grid having to scroll past either the verticle/horizontal scroll bars to show all of the cells contents thus creating the slight mis-alignment with the headers and columns/rows
A workaround for this is to set enableHorizontalScrollbar: 0 on your gridOptions and then in your stylesheet have the following:
.ui-grid .ui-grid-render-container-body .ui-grid-viewport {
overflow-x: auto !important;
}
Now the horizontal scroll bar only displays when needed.