NG-网格水平滚动 - 2.0.11 [英] Horizontal Scrolling of ng-grid - 2.0.11

查看:167
本文介绍了NG-网格水平滚动 - 2.0.11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个NG格在我的应用程序。的高度和宽度的网格的给定为自动。我的选择动态地添加列到网格中。当列的数目是较少的是没有问题的。但是,如果有更多的列数则不但得不到水平滚动条我列收缩尺寸和所有列出现在一个肮脏的方式在我的网格。网格的宽度不改变,并且所有的列被收缩以适应电网。我很想念得到横向滚动条什么。

I have a ng-grid in my application. The height and width of the grid is given as auto. I have option to add the column dynamically to the grid. When the number of columns is less there is no problem. But if there is more number of columns then instead of getting Horizontal scrollbar my columns are shrinked in size and all the columns appear in a dirty manner in my grid. The width of the grid is not altered and all the columns are shrinked to fit the grid. What i am missing to get horizontal scrollbar.

编辑:      以上是我原来的问题。我现在能得到水平滚动条。但只有特定的列都可见。当我向右滚动我收到空网格。最后几coulmns不绑定到NG-电网。只有那些适合NG网不滚动的绑定列。任何解决方案请!

The above is my original question. Now i am able to get horizontal scrollbar. But only certain columns are visible. When i scroll right i am getting empty grid. The last few coulmns are not binded to ng-grid. Only the columns that are fit to ng-grid without scrolling are binded. Any solution please !

注意:      我使用的NG-电网2.0.11。是版本是有这个bug?

Note: I am using ng-grid 2.0.11. Is the version is having this bug?

https://github.com/angular-ui/ng-grid/问题/ 2071

推荐答案

我也有类似的问题,并遵循以下两个步骤:

I have similar issue and followed these two steps:

The width of each column should be given in px format only. There will be some issue if it is given in %format.

The ng-grid.css have to be updated to have .ngviewport class with overflow:auto. In my project .ngviewport did not have overflow and this too was a reason for the issue.

这篇关于NG-网格水平滚动 - 2.0.11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆