当autoHeight已经设置时,ext js问题设置动态的网格高度 [英] Ext js problem setting height dynamicly of a grid when autoHeight is already set

查看:138
本文介绍了当autoHeight已经设置时,ext js问题设置动态的网格高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当初始设置为autoheight为true时,我正在尝试将高度切换为网格。
我想要能够在网格变大时浏览器视图切换高度。

I am trying to toggle the height off a grid when the initial setup has autoheight is true. I want to be able to toggle the height when the grid becomes bigger then the browser view.

网格在没有ext视口的普通页面上。

The grid is on a normal page without an ext viewport.

如果我尝试设置这样的高度,那么我松开滚动条。
我可以在firebug中看到,溢出设置为可见,而不是自动。
我该如何更改?

If I try setting a height like this, then I loose the scrollbar. I can see in firebug that the overflow is set to visible instead off auto. How can I change that?

mygrid.autoHeight=false;
mygrid.setHeight(200);

如果我离开autoHeight是真正的网格的初始设置,我无法确定

If I leave autoHeight is true out of the initial setup of the grid, I have no way to determine the height it needs for the rows.

有没有人可能有这个问题的解决方案/解决方法?

Does anyone possibly have a solution/workaround for this problem?

感谢你,理查德

编辑

p>

I think this will work

var scroller = Ext.select("#grid-rekovz div.x-grid3-scroller");
scroller.setStyle('overflow-y','auto');


推荐答案

如果您使用autoHeight:true;那么你将高度计算问题委托给浏览器,所以你失去了对它的控制。如果使用autoHeight:false;那么您可以根据需要更改高度,但如果浏览器在分配区域变大后,就不会将滚动条添加到内容。

If you use autoHeight:true; then you delegate height calculating problems to browser, so you lose control of it. If you use autoHeight:false; then you can change height as you wish, but browser will not added scrollbar to content if it became larger then assigned area.

P。是的,我是necroposter =)。

P. S. And yes, I'm necroposter =).

这篇关于当autoHeight已经设置时,ext js问题设置动态的网格高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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