Search code examples
htmlcssangularjsangular-ui-grid

AngularJS UI: how to apply my css class to overwrite the original css class of ui grid


As the title says, for example, I want to create a CSS class named myViewport to overwrite ui-grid-viewport (ui-grid).


Solution

  • This should have been discussed several times here. You can disable the horizontal bar with enableHorizontalScrollbar option. I don't think you would require css to achieve this unless you are trying out something different.

    $scope.grid = {
    enableHorizontalScrollbar: 0
    };
    

    It can take any one of the following values:

    0 = disable;
    1 = enable;
    2 = enable when needed;
    

    And note that you would need to pass the uiGridConstants to your controller.

    You shall also check this github repository for more info. https://github.com/angular-ui/ui-grid