Turnoff Scrolling within Angular UI ng-grid?

后端 未结 4 2110
再見小時候
再見小時候 2020-12-29 11:13

We would like to use the Angular UI ng-grid, but can\'t seem to find an option to tell the viewport within the grid to not set the overflow to auto and not scroll.

W

4条回答
  •  青春惊慌失措
    2020-12-29 12:04

    I recently ran into same issues and found a solution at https://groups.google.com/forum/#!topic/angular/KiBXP3eKCDY

    You want ng-grid to initialize after you have data.

    The following solution requires using angular-ui:

    $scope.getTableStyle= function() { var rowHeight=30; var headerHeight=45; return { height: ($scope.dataForGrid.length * rowHeight + headerHeight) + "px" }; };

提交回复
热议问题