我对剑道网格有疑问,我有一个窗口
,窗口内有一个tabstrip
,选项卡的内容是两个网格,分别显示在 tab1 和tab2 分别,窗口一开始也是不可见的。
我的问题是第二个选项卡中的网格高度
超过了原始网格内容高度。
我在 jsfiddle clickhere 中重新创建了问题.我想有人可以帮助我。
最佳答案
要获得上述评论中所述的结果:
You want a grid that shows all results not using paging but scrolling. But this grid is inside a tabstrip tab (that happens to be inside a window) so it should not overflow its container (the tabstrip tab)
你应该:
- 据我所知,
height
不是kendoTabStrip
的有效选项,您可以将其删除。 - 您不需要分页,而是从服务器获取所有结果然后滚动。因此,您需要从
Grid
初始化中删除pageable: ...
以及从DataSource
中删除pageSize: 10
> 初始化。 - 创建网格后,您应该删除 Kendo UI 引入的
height
样式,因为它没有通过执行$("#grid2").css 正确计算(!?) (“高度”,“”);
。在我看来这有点棘手,但否则我无法让它运行。 - 您应该稍微降低网格的高度,否则它不适合窗口。我把它改成了450。
如下modification of your example我对 grid2
进行了此修改(仅适用于 grid2)。
关于jquery - 在窗口内显示时网格高度问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14514978/