0
votes

when I use angular-ui-grid,I found the HorizontalScrollbar always appears. And I try to use enableHorizontalScrollbar:2 in gridOptions. But it doesn't work.and when I show or hide the HorizontalScrollbar like this example.
enter image description here
The left side's selection will be malposition.
any solution?

1

1 Answers

0
votes

This is a size problem, Try to set the width of the column to fit your object size, When you do the horizontal scrollbar will disappear.

Changing the column size to

   $scope.gridOptions.columnDefs = [
       { name:'id', width:50},
       { name:'name', width:50 },
       { name:'age', width:50 }
     ];

produces a table without horizontal lines


In angular-ui-grid you have an autoResize option,This should solve your problem if the data can actually fit the table.

You can read about it here: http://ui-grid.info/docs/#/tutorial/213_auto_resizing